Skip to content

Commit dba12b0

Browse files
committed
refactor: eliminate sass from the build
1 parent 14bef91 commit dba12b0

18 files changed

+379
-346
lines changed

examples/basic-example/app.js

+10-8
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ import {
33
SortableTreeWithoutDndContext as SortableTree,
44
toggleExpandedForAll,
55
} from '../../src/index';
6-
import styles from './stylesheets/app.scss';
6+
import './stylesheets/vendor/stylesheet.css';
7+
import './stylesheets/vendor/github-light.css';
8+
import './stylesheets/app.css';
79
import '../shared/favicon/apple-touch-icon.png';
810
import '../shared/favicon/favicon-16x16.png';
911
import '../shared/favicon/favicon-32x32.png';
@@ -218,15 +220,15 @@ class App extends Component {
218220

219221
return (
220222
<div>
221-
<section className={styles['page-header']}>
222-
<h1 className={styles['project-name']}>{projectName}</h1>
223+
<section className="page-header">
224+
<h1 className="project-name">{projectName}</h1>
223225

224-
<h2 className={styles['project-tagline']}>
226+
<h2 className="project-tagline">
225227
Drag-and-drop sortable representation of hierarchical data
226228
</h2>
227229
</section>
228230

229-
<section className={styles['main-content']}>
231+
<section className="main-content">
230232
<h3>Demo</h3>
231233
<button onClick={this.expandAll}>Expand All</button>
232234
<button onClick={this.collapseAll}>Collapse All</button>
@@ -318,13 +320,13 @@ class App extends Component {
318320
<a href={githubUrl}>Documentation on Github</a>
319321
<br />
320322
<a href="storybook/index.html">More examples on Storybook</a>
321-
<footer className={styles['site-footer']}>
322-
<span className={styles['site-footer-owner']}>
323+
<footer className="site-footer">
324+
<span className="site-footer-owner">
323325
<a href={githubUrl}>{projectName}</a> is maintained by{' '}
324326
<a href={authorUrl}>{authorName}</a>.
325327
</span>
326328

327-
<span className={styles['site-footer-credits']}>
329+
<span className="site-footer-credits">
328330
This page was generated by{' '}
329331
<a href="https://pages.github.com">GitHub Pages</a> using the{' '}
330332
<a href="https://github.com/jasonlong/cayman-theme">
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
@import './vendor/stylesheet';
2-
@import './vendor/github-light';
3-
41
.page-header {
52
padding: 1rem 6rem;
63
}
@@ -17,10 +14,12 @@ body {
1714
/**
1815
* Uncomment to simulate bootstrap environment
1916
*/
20-
// html {
21-
// box-sizing: border-box;
22-
// }
17+
/*
18+
html {
19+
box-sizing: border-box;
20+
}
2321
24-
// *, *::before, *::after {
25-
// box-sizing: inherit;
26-
// }
22+
*, *::before, *::after {
23+
box-sizing: inherit;
24+
}
25+
*/

examples/basic-example/stylesheets/vendor/github-light.css

+20-21
Original file line numberDiff line numberDiff line change
@@ -15,30 +15,30 @@
1515
1616
*/
1717

18-
.pl-c /* comment */ {
18+
.pl-c {
1919
color: #969896;
2020
}
2121

2222
.pl-c1 /* constant, markup.raw, meta.diff.header, meta.module-reference, meta.property-name, support, support.constant, support.variable, variable.other.constant */,
23-
.pl-s .pl-v /* string variable */ {
23+
.pl-s .pl-v {
2424
color: #0086b3;
2525
}
2626

2727
.pl-e /* entity */,
28-
.pl-en /* entity.name */ {
28+
.pl-en {
2929
color: #795da3;
3030
}
3131

3232
.pl-s .pl-s1 /* string source */,
33-
.pl-smi /* storage.modifier.import, storage.modifier.package, storage.type.java, variable.other, variable.parameter.function */ {
33+
.pl-smi {
3434
color: #333;
3535
}
3636

37-
.pl-ent /* entity.name.tag */ {
37+
.pl-ent {
3838
color: #63a35c;
3939
}
4040

41-
.pl-k /* keyword, storage, storage.type */ {
41+
.pl-k {
4242
color: #a71d5d;
4343
}
4444

@@ -48,69 +48,68 @@
4848
.pl-sr /* string.regexp */,
4949
.pl-sr .pl-cce /* string.regexp constant.character.escape */,
5050
.pl-sr .pl-sra /* string.regexp string.regexp.arbitrary-repitition */,
51-
.pl-sr .pl-sre /* string.regexp source.ruby.embedded */ {
51+
.pl-sr .pl-sre {
5252
color: #183691;
5353
}
5454

55-
.pl-v /* variable */ {
55+
.pl-v {
5656
color: #ed6a43;
5757
}
5858

59-
.pl-id /* invalid.deprecated */ {
59+
.pl-id {
6060
color: #b52a1d;
6161
}
6262

63-
.pl-ii /* invalid.illegal */ {
63+
.pl-ii {
6464
background-color: #b52a1d;
6565
color: #f8f8f8;
6666
}
6767

68-
.pl-sr .pl-cce /* string.regexp constant.character.escape */ {
68+
.pl-sr .pl-cce {
6969
color: #63a35c;
7070
font-weight: bold;
7171
}
7272

73-
.pl-ml /* markup.list */ {
73+
.pl-ml {
7474
color: #693a17;
7575
}
7676

7777
.pl-mh /* markup.heading */,
7878
.pl-mh .pl-en /* markup.heading entity.name */,
79-
.pl-ms /* meta.separator */ {
79+
.pl-ms {
8080
color: #1d3e81;
8181
font-weight: bold;
8282
}
8383

84-
.pl-mq /* markup.quote */ {
84+
.pl-mq {
8585
color: #008080;
8686
}
8787

88-
.pl-mi /* markup.italic */ {
88+
.pl-mi {
8989
color: #333;
9090
font-style: italic;
9191
}
9292

93-
.pl-mb /* markup.bold */ {
93+
.pl-mb {
9494
color: #333;
9595
font-weight: bold;
9696
}
9797

98-
.pl-md /* markup.deleted, meta.diff.header.from-file */ {
98+
.pl-md {
9999
background-color: #ffecec;
100100
color: #bd2c00;
101101
}
102102

103-
.pl-mi1 /* markup.inserted, meta.diff.header.to-file */ {
103+
.pl-mi1 {
104104
background-color: #eaffea;
105105
color: #55a532;
106106
}
107107

108-
.pl-mdr /* meta.diff.range */ {
108+
.pl-mdr {
109109
color: #795da3;
110110
font-weight: bold;
111111
}
112112

113-
.pl-mo /* meta.output */ {
113+
.pl-mo {
114114
color: #1d3e81;
115115
}
116-

examples/basic-example/stylesheets/vendor/stylesheet.css

+77-31
Original file line numberDiff line numberDiff line change
@@ -12,123 +12,169 @@ body {
1212
border-style: solid;
1313
border-width: 1px;
1414
border-radius: 0.3rem;
15-
transition: color 0.2s, background-color 0.2s, border-color 0.2s; }
16-
.btn + .btn {
17-
margin-left: 1rem; }
15+
transition: color 0.2s, background-color 0.2s, border-color 0.2s;
16+
}
17+
.btn + .btn {
18+
margin-left: 1rem;
19+
}
1820

1921
.btn:hover {
2022
color: rgba(255, 255, 255, 0.8);
2123
text-decoration: none;
2224
background-color: rgba(255, 255, 255, 0.2);
23-
border-color: rgba(255, 255, 255, 0.3); }
25+
border-color: rgba(255, 255, 255, 0.3);
26+
}
2427

2528
@media screen and (min-width: 64em) {
2629
.btn {
27-
padding: 0.75rem 1rem; } }
30+
padding: 0.75rem 1rem;
31+
}
32+
}
2833

2934
@media screen and (min-width: 42em) and (max-width: 64em) {
3035
.btn {
3136
padding: 0.6rem 0.9rem;
32-
font-size: 0.9rem; } }
37+
font-size: 0.9rem;
38+
}
39+
}
3340

3441
@media screen and (max-width: 42em) {
3542
.btn {
3643
display: block;
3744
width: 100%;
3845
padding: 0.75rem;
39-
font-size: 0.9rem; }
40-
.btn + .btn {
41-
margin-top: 1rem;
42-
margin-left: 0; } }
46+
font-size: 0.9rem;
47+
}
48+
.btn + .btn {
49+
margin-top: 1rem;
50+
margin-left: 0;
51+
}
52+
}
4353

4454
.page-header {
4555
color: #fff;
4656
text-align: center;
4757
background-color: #159957;
48-
background-image: linear-gradient(120deg, #155799, #159957); }
58+
background-image: linear-gradient(120deg, #155799, #159957);
59+
}
4960

5061
@media screen and (min-width: 64em) {
5162
.page-header {
52-
padding: 5rem 6rem; } }
63+
padding: 5rem 6rem;
64+
}
65+
}
5366

5467
@media screen and (min-width: 42em) and (max-width: 64em) {
5568
.page-header {
56-
padding: 3rem 4rem; } }
69+
padding: 3rem 4rem;
70+
}
71+
}
5772

5873
@media screen and (max-width: 42em) {
5974
.page-header {
60-
padding: 2rem 1rem; } }
75+
padding: 2rem 1rem;
76+
}
77+
}
6178

6279
.project-name {
6380
margin-top: 0;
64-
margin-bottom: 0.1rem; }
81+
margin-bottom: 0.1rem;
82+
}
6583

6684
@media screen and (min-width: 64em) {
6785
.project-name {
68-
font-size: 3.25rem; } }
86+
font-size: 3.25rem;
87+
}
88+
}
6989

7090
@media screen and (min-width: 42em) and (max-width: 64em) {
7191
.project-name {
72-
font-size: 2.25rem; } }
92+
font-size: 2.25rem;
93+
}
94+
}
7395

7496
@media screen and (max-width: 42em) {
7597
.project-name {
76-
font-size: 1.75rem; } }
98+
font-size: 1.75rem;
99+
}
100+
}
77101

78102
.project-tagline {
79103
margin-bottom: 2rem;
80104
font-weight: normal;
81-
opacity: 0.7; }
105+
opacity: 0.7;
106+
}
82107

83108
@media screen and (min-width: 64em) {
84109
.project-tagline {
85-
font-size: 1.25rem; } }
110+
font-size: 1.25rem;
111+
}
112+
}
86113

87114
@media screen and (min-width: 42em) and (max-width: 64em) {
88115
.project-tagline {
89-
font-size: 1.15rem; } }
116+
font-size: 1.15rem;
117+
}
118+
}
90119

91120
@media screen and (max-width: 42em) {
92121
.project-tagline {
93-
font-size: 1rem; } }
122+
font-size: 1rem;
123+
}
124+
}
94125

95126
@media screen and (min-width: 64em) {
96127
.main-content {
97128
max-width: 64rem;
98129
padding: 2rem 6rem;
99130
margin: 0 auto;
100-
font-size: 1.1rem; } }
131+
font-size: 1.1rem;
132+
}
133+
}
101134

102135
@media screen and (min-width: 42em) and (max-width: 64em) {
103136
.main-content {
104137
padding: 2rem 4rem;
105-
font-size: 1.1rem; } }
138+
font-size: 1.1rem;
139+
}
140+
}
106141

107142
@media screen and (max-width: 42em) {
108143
.main-content {
109144
padding: 2rem 1rem;
110-
font-size: 1rem; } }
145+
font-size: 1rem;
146+
}
147+
}
111148

112149
.site-footer {
113150
padding-top: 2rem;
114151
margin-top: 2rem;
115-
border-top: solid 1px #eff0f1; }
152+
border-top: solid 1px #eff0f1;
153+
}
116154

117155
.site-footer-owner {
118156
display: block;
119-
font-weight: bold; }
157+
font-weight: bold;
158+
}
120159

121160
.site-footer-credits {
122-
color: #819198; }
161+
color: #819198;
162+
}
123163

124164
@media screen and (min-width: 64em) {
125165
.site-footer {
126-
font-size: 1rem; } }
166+
font-size: 1rem;
167+
}
168+
}
127169

128170
@media screen and (min-width: 42em) and (max-width: 64em) {
129171
.site-footer {
130-
font-size: 1rem; } }
172+
font-size: 1rem;
173+
}
174+
}
131175

132176
@media screen and (max-width: 42em) {
133177
.site-footer {
134-
font-size: 0.9rem; } }
178+
font-size: 0.9rem;
179+
}
180+
}

0 commit comments

Comments
 (0)