-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathno-fonts.sass
270 lines (240 loc) · 6.02 KB
/
no-fonts.sass
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
264
265
266
267
268
269
270
%user-select-none
-webkit-touch-callout: none
-webkit-user-select: none
-khtml-user-select: none
-moz-user-select: none
-ms-user-select: none
user-select: none
@mixin transition($text...)
-webkit-transition: $text
-moz-transition: $text
-o-transition: $text
-ms-transition: $text
transition: $text
.spainterContainer
display: flex
outline: none
width: 100%
height: 100%
flex-direction: column
position: relative
.active-icon
color: red
.disabled
color: grey
.spainterHidden
display: none !important
.paint-crp-rect
position: absolute
min-width: 20px
min-height: 20px
@extend %user-select-none
border: 1px dashed #cacaca
$square-size: -4px
.paintPastedImg
width: 100%
height: 100%
cursor: move
@extend %user-select-none
margin-bottom: $square-size
%painterCrop
position: absolute
background-color: #e2e2e2
border: 1px solid #cacaca
width: 6px
height: 6px
z-index: 2
[pos=tl]
@extend %painterCrop
top: 0
left: 0
margin: $square-size 0 0 $square-size
cursor: se-resize
[pos=bl]
@extend %painterCrop
left: 0
bottom: 0
margin: 0 0 $square-size $square-size
cursor: ne-resize
[pos=br]
@extend %painterCrop
right: 0
bottom: 0
margin: 0 $square-size $square-size 0
cursor: se-resize
[pos=tr]
@extend %painterCrop
right: 0
top: 0
margin: $square-size $square-size 0 0
cursor: ne-resize
[pos=l]
@extend %painterCrop
top: 50%
left: 0
margin: $square-size 0 0 $square-size
cursor: e-resize
[pos=t]
@extend %painterCrop
top: 0
left: 50%
margin: $square-size 0 0 $square-size
cursor: s-resize
[pos=r]
@extend %painterCrop
top: 50%
right: 0
margin: $square-size $square-size 0 0
cursor: e-resize
[pos=b]
@extend %painterCrop
left: 50%
bottom: 0
margin: 0 0 $square-size $square-size
cursor: s-resize
.canvasResize
cursor: se-resize
position: absolute
background-color: rgba(128, 128, 128, 0.5)
bottom: 0px
right: 0px
width: 10px
height: 10px
.paintResizeTools
display: inline-block
padding-right: 10px
> input
width: 50px
.toolsAndCanvas
display: flex
flex-direction: row
width: 100%
flex-grow: 1
min-height: 0
$two-columns-painter: 600px
.painterTools
padding-left: 10px
display: flex
flex-direction: column
margin-left: -5px
height: fit-content
*
cursor: pointer
display: block
padding: 5px 5px 5px 0
@media screen and (max-height: $two-columns-painter)
width: 60px
min-width: 60px
flex-direction: row
flex-wrap: wrap
.canvasWrapper
width: 100%
// height: 100% DO not set it to 100%, since parent has flex grow it will automatically collaps to 100%
// if height is set, safari won't make it work right, it would no have scroll at all
position: relative
overflow: auto
// select none prevent paste event https://stackoverflow.com/questions/31207253/onpaste-paste-event-not-firing-for-table-on-first-few-attempts
//@extend %user-select-none
//max-height: calc(100vh - 95px)
//max-width: calc(100vw - 60px)
//@media screen and (max-height: $two-columns-painter)
// max-width: calc(100vw - 90px)
border: 1px dashed rgba(128, 128, 128, 0.5)
.painter
touch-action: none
canvas
$c1: #cacacc
$c2: transparent
//background-image: -moz-linear-gradient(45deg, $c1 25%, $c2 25%), -moz-linear-gradient(-45deg, $c1 25%, $c2 25%), -moz-linear-gradient(45deg, $c2 75%, $c1 75%), -moz-linear-gradient(-45deg, $c2 75%, $c1 75%)
//background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(.25, $c1), color-stop(.25, $c2)), -webkit-gradient(linear, 0 0, 100% 100%, color-stop(.25, $c1), color-stop(.25, $c2)), -webkit-gradient(linear, 0 100%, 100% 0, color-stop(.75, $c2), color-stop(.75, $c1)), -webkit-gradient(linear, 0 0, 100% 100%, color-stop(.75, $c2), color-stop(.75, $c1))
$width: 50px
$h_width: calc($width / 2)
-moz-background-size: $width $width
//background-size: $width $width
-webkit-background-size: $width $width /* override value for shitty webkit */
//background-position: 0 0, $h_width 0, $h_width -#{$h_width}, 0px $h_width
background-image: linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%, #ccc), linear-gradient(45deg, #ccc 25%, transparent 25%, transparent 75%, #ccc 75%, #ccc)
background-size: 50px 50px
background-position: 0 0, 25px 25px
.text
position: absolute
border: 1px dashed
width: auto
min-width: 5px
word-wrap: normal
padding: 0 1px
.bottomTools
padding-top: 7px
margin-left: 24px
flex-grow: 0
display: flex
max-width: 100%
overflow-x: auto
%hideEl
display: inline-block
vertical-align: top
input[type=text]
width: 30px
padding: 5px
vertical-align: top
> span
vertical-align: top
display: inline-block
padding-top: 3px
> input
margin-right: 0
div
display: inline-block
@media (pointer:none), (pointer:coarse)
input[type=text]
display: none
input[type=range]
width: 50px
.paintSend
cursor: pointer
vertical-align: top
.paintXYdimens
font-size: 12px
position: relative
margin-left: auto
order: 2
padding: 1px 10px
display: inline-block
> *
display: inline-block
.paintFont
@extend %hideEl
select
display: inline-block
text-decoration: none
text-overflow: ellipsis
overflow: hidden
white-space: nowrap
width: 120px
font-size: 14px
height: 25px
border: 1px solid grey
.paintOpacity, .paintFillOpacity
@extend %hideEl
.paintRadius
@extend %hideEl
.paintApplyText
display: inline-block
input[type=button][disabled]
display: none
.paintColor, .paintColorFill
@extend %hideEl
width: 25px
height: 25px
border: 1px solid grey
input[type=color]
-webkit-appearance: none
padding: 0
border: 1px solid grey
border-radius: 1px
height: 25px
width: 25px
&::-webkit-color-swatch-wrapper
padding: 0
&::-webkit-color-swatch
border: none