-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.styl
263 lines (263 loc) · 4.54 KB
/
index.styl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
appearance()
-webkit-appearance arguments
appearance arguments
user-drag()
-webkit-user-drag arguments
user-drag arguments
body
margin 0
font 15px "Roboto",sans-serif
word-break break-word
user-select none
*, *:before, *:after
box-sizing border-box
:focus
outline 0
.row
display flex
flex-direction row
.column
display flex
flex-direction column
.col
flex 1
.col-0
flex-shrink 0
for i in range(1, 12)
val = floor(i / 12 * 100%, 2)
.row > .col-{i}
width val
.column > .col-{i}
height val
val = floor(100% / i, 2)
.row-{i}
display grid
grid-template-columns repeat(i,1fr)
> .col-{i}
grid-column span (i)
.full
position absolute
inset 0
.wrap
flex-wrap wrap
.nowrap
flex-wrap nowrap
for dir in row column
.{dir}
prop = dir is row ? "justify-content" : "align-items"
&.start
{prop} flex-start
&.center
{prop} center
&.end
{prop} flex-end
prop = dir is row ? "align-items" : "justify-content"
&.top
{prop} flex-start
&.middle
{prop} center
&.bottom
{prop} flex-end
.between
justify-content space-between
.around
justify-content space-around
.evenly
justify-content space-evenly
.stretch
align-items stretch
props = {p: padding, m: margin}
sides = {t: top, r: right, b: bottom, l: left}
sizes = 32px 16px 8px 4px 2px 0
for p, prop in props
for size, i in sizes
i = 5 - i
.{p}-{i}
{prop} size
.-{p}-{i}
{prop} -(size)
.{p}x-{i}
{prop}-left size
{prop}-right size
.{p}y-{i}
{prop}-top size
{prop}-bottom size
.-{p}x-{i}
{prop}-left -(size)
{prop}-right -(size)
.-{p}y-{i}
{prop}-top -(size)
{prop}-bottom -(size)
for s, side in sides
.{p}{s}-{i}
{prop}-{side} size
if p is m and i
.-{p}{s}-{i}
{prop}-{side} -(size)
for size, i in sizes
i = 5 - i
.gap-{i}
grid-gap size
.gap-x-{i}
grid-column-gap size
.gap-y-{i}
grid-row-gap size
for pos in absolute relative fixed
.{pos}
position pos
for size in 100 75 50 25 0
.w-{size}
width (size)%
.h-{size}
height (size)%
for i in 0..5
.z-{i}
z-index i
if i
.-z-{i}
z-index -(i)
for dis in block inline-block inline flex inline-flex
.{dis}
display dis
.hidden, [hidden]
display none
for align in left center right justify
.text-{align}
text-align align
.text-nowrap
white-space nowrap
word-break break-word
.text-truncate
overflow hidden
text-overflow ellipsis
white-space nowrap
word-break break-word
.text-small, small
font-size 13px
for whs in nowrap pre pre-line pre-wrap
.text-{whs}
white-space whs
for h in range(0, 9)
.text-height-{h + 10}
line-height floor((h + 10) / 10, 1)
.scroll
overflow auto
.noscroll
overflow hidden
.event
pointer-events auto
.noevent
pointer-events none
.events
pointer-events none
> *
pointer-events auto
.box
border solid 1px #bbb
border-radius 4px
box-shadow inset
.button
min-height 28px
padding 0 8px
border solid 1px #bbb
border-radius 4px
font inherit
background #eee
color #000
box-shadow 0 0 0 1px inset #fff
&:active
background #ccc
box-shadow none
.input
height 28px
padding 0 8px
border solid 1px #bbb
border-radius 4px
font inherit
background #eee
color #000
box-shadow 0 0 0 1px inset #fff
.rangeInput
appearance none
height 28px
margin 0
&::-webkit-slider-runnable-track
appearance none
height 12px
border solid 1px #ccc
border-radius 4px
background #ddd
&::-webkit-slider-thumb
appearance none
width 16px
height 24px
margin-top -7px
border solid 1px #bbb
border-radius 4px
background #eee
box-shadow 0 0 0 1px inset #fff
.checkInput
appearance none
position relative
width 20px
height 20px
margin 4px 0
border solid 1px #bbb
border-radius 4px
background #eee
box-shadow 0 0 0 1px inset #fff
&:checked
&:after
content "\f00c"
position absolute
inset 1px 0 0 0
display flex
justify-content center
align-items center
font 900 15px "Font Awesome 5 Pro"
.ColorInput
position relative
height 28px
border solid 1px #bbb
border-radius 4px
display inline-flex
background #eee
box-shadow 0 0 0 1px inset #fff
.ColorInput-text
width 75%
height 100%
border 0
padding 0 8px
background #0000
.ColorInput-color
width 25%
margin 2px
border solid 1px #8883
border-radius 3px
.ColorInput-input
position absolute
left -1px
top 0
width calc(100% + 2px)
height 100%
padding 0
border 0
visibility hidden
&::-webkit-color-swatch-wrapper
padding 0
&::-webkit-color-swatch
border 0
.main
position absolute
inset 0
display flex
.toolbar
padding 8px
min-width 300px
max-width 300px
.view
flex-grow 1
overflow hidden
#canvas
display block
image-rendering pixelated