unit.gl 0.0.34 → 0.0.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -201
- package/README.md +20 -70
- package/css/unit.gl.css +182 -341
- package/css/unit.gl.min.css +1 -1
- package/package.json +11 -5
- package/scss/_global.scss +5 -25
- package/scss/_reset.scss +13 -16
- package/scss/classes/_guide.scss +126 -0
- package/scss/classes/_index.scss +25 -11
- package/scss/classes/_ratio.scss +30 -0
- package/scss/dev/_banner.scss +40 -0
- package/scss/dev/_index.scss +0 -0
- package/scss/functions/_color.scss +40 -0
- package/scss/functions/_index.scss +39 -14
- package/scss/functions/_layer.scss +48 -0
- package/scss/functions/_ratio.scss +58 -157
- package/scss/functions/_scale.scss +55 -49
- package/scss/functions/_sequence.scss +154 -126
- package/scss/functions/_view.scss +40 -0
- package/scss/functions/math/_arithmetic.scss +102 -0
- package/scss/functions/math/_index.scss +30 -0
- package/scss/functions/unit/_index.scss +30 -0
- package/scss/functions/unit/_unit_conversion.scss +94 -0
- package/scss/{variables → functions/unit}/_unit_functions.scss +70 -36
- package/scss/index.scss +5 -31
- package/scss/maps/_color.scss +43 -0
- package/scss/maps/_index.scss +1 -0
- package/scss/mixins/_device.scss +63 -25
- package/scss/mixins/_display.scss +106 -44
- package/scss/mixins/_guide.scss +191 -158
- package/scss/mixins/_helper.scss +287 -52
- package/scss/mixins/_index.scss +50 -17
- package/scss/mixins/_paper.scss +38 -17
- package/scss/mixins/_ratio.scss +30 -13
- package/scss/mixins/_unit.scss +94 -0
- package/scss/mixins/_view.scss +123 -44
- package/scss/tags/_index.scss +30 -0
- package/scss/tags/_unit.scss +40 -0
- package/scss/utilities/_guides.scss +103 -0
- package/scss/utilities/_index.scss +6 -0
- package/scss/variables/_color.scss +83 -0
- package/scss/variables/_device.scss +144 -57
- package/scss/variables/_index.scss +85 -18
- package/scss/variables/_layer.scss +148 -51
- package/scss/variables/_paper.scss +243 -17
- package/scss/variables/_ratio.scss +224 -0
- package/scss/variables/_scale.scss +231 -105
- package/scss/variables/_unit.scss +77 -59
- package/scss/variables/_view.scss +137 -33
- package/ts/AspectRatio.ts +29 -0
- package/ts/Border.ts +29 -0
- package/ts/BoxModel.ts +40 -0
- package/ts/FlexContainer.ts +48 -0
- package/ts/Grid.ts +21 -0
- package/ts/GridContainer.ts +33 -0
- package/ts/Layout.ts +34 -0
- package/ts/Position.ts +28 -0
- package/ts/Rectangle.ts +28 -0
- package/ts/ResponsiveImage.ts +28 -0
- package/ts/ResponsiveScale.ts +21 -0
- package/ts/Size.ts +32 -0
- package/ts/Spacing.ts +68 -0
- package/ts/Transform.ts +38 -0
- package/ts/Typography.ts +41 -0
- package/ts/Unit.ts +57 -0
- package/ts/Viewport.ts +24 -0
- package/js/index.d.ts +0 -1
- package/js/index.js +0 -3
- package/js/unit.gl.min.js +0 -1
- package/scss/classes/_paper.scss +0 -97
- package/scss/functions/_arithmetic.scss +0 -64
- package/scss/variables/_unit_conversion.scss +0 -77
package/css/unit.gl.css
CHANGED
|
@@ -1,65 +1,183 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
*,
|
|
2
|
+
a,
|
|
3
|
+
abbr,
|
|
4
|
+
acronym,
|
|
5
|
+
address,
|
|
6
|
+
applet,
|
|
7
|
+
area,
|
|
8
|
+
article,
|
|
9
|
+
aside,
|
|
10
|
+
audio,
|
|
11
|
+
b,
|
|
12
|
+
base,
|
|
13
|
+
basefont,
|
|
14
|
+
bb,
|
|
15
|
+
bdo,
|
|
16
|
+
big,
|
|
17
|
+
blockquote,
|
|
18
|
+
body,
|
|
19
|
+
br,
|
|
20
|
+
button,
|
|
21
|
+
canvas,
|
|
22
|
+
caption,
|
|
23
|
+
center,
|
|
24
|
+
cite,
|
|
25
|
+
code,
|
|
26
|
+
col,
|
|
27
|
+
colgroup,
|
|
28
|
+
command,
|
|
29
|
+
datalist,
|
|
30
|
+
dd,
|
|
31
|
+
del,
|
|
32
|
+
details,
|
|
33
|
+
dfn,
|
|
34
|
+
dialog,
|
|
35
|
+
dir,
|
|
36
|
+
div,
|
|
37
|
+
dl,
|
|
38
|
+
dt,
|
|
39
|
+
em,
|
|
40
|
+
embed,
|
|
41
|
+
eventsource,
|
|
42
|
+
fieldset,
|
|
43
|
+
figcaption,
|
|
44
|
+
figure,
|
|
45
|
+
font,
|
|
46
|
+
footer,
|
|
47
|
+
form,
|
|
48
|
+
frame,
|
|
49
|
+
frameset,
|
|
50
|
+
h1,
|
|
51
|
+
h2,
|
|
52
|
+
h3,
|
|
53
|
+
h4,
|
|
54
|
+
h5,
|
|
55
|
+
h6,
|
|
56
|
+
head,
|
|
57
|
+
header,
|
|
58
|
+
hgroup,
|
|
59
|
+
hr,
|
|
60
|
+
html,
|
|
61
|
+
i,
|
|
62
|
+
iframe,
|
|
63
|
+
img,
|
|
64
|
+
input,
|
|
65
|
+
ins,
|
|
66
|
+
isindex,
|
|
67
|
+
kbd,
|
|
68
|
+
keygen,
|
|
69
|
+
label,
|
|
70
|
+
legend,
|
|
71
|
+
li,
|
|
72
|
+
link,
|
|
73
|
+
map,
|
|
74
|
+
mark,
|
|
75
|
+
menu,
|
|
76
|
+
meta,
|
|
77
|
+
meter,
|
|
78
|
+
nav,
|
|
79
|
+
noframes,
|
|
80
|
+
noscript,
|
|
81
|
+
object,
|
|
82
|
+
ol,
|
|
83
|
+
optgroup,
|
|
84
|
+
option,
|
|
85
|
+
output,
|
|
86
|
+
p,
|
|
87
|
+
param,
|
|
88
|
+
pre,
|
|
89
|
+
progress,
|
|
90
|
+
q,
|
|
91
|
+
rp,
|
|
92
|
+
rt,
|
|
93
|
+
ruby,
|
|
94
|
+
s,
|
|
95
|
+
samp,
|
|
96
|
+
script,
|
|
97
|
+
section,
|
|
98
|
+
select,
|
|
99
|
+
small,
|
|
100
|
+
source,
|
|
101
|
+
span,
|
|
102
|
+
strike,
|
|
103
|
+
strong,
|
|
104
|
+
style,
|
|
105
|
+
sub,
|
|
106
|
+
sup,
|
|
107
|
+
table,
|
|
108
|
+
tbody,
|
|
109
|
+
td,
|
|
110
|
+
textarea,
|
|
111
|
+
tfoot,
|
|
112
|
+
th,
|
|
113
|
+
thead,
|
|
114
|
+
time,
|
|
115
|
+
title,
|
|
116
|
+
tr,
|
|
117
|
+
track,
|
|
118
|
+
tt,
|
|
119
|
+
u,
|
|
120
|
+
ul,
|
|
121
|
+
var,
|
|
122
|
+
video,
|
|
123
|
+
wbr {
|
|
124
|
+
margin: 0;
|
|
125
|
+
margin-block-start: 0;
|
|
126
|
+
margin-block-end: 0;
|
|
127
|
+
margin-inline-start: 0;
|
|
128
|
+
margin-inline-end: 0;
|
|
129
|
+
padding: 0;
|
|
130
|
+
border: 0;
|
|
131
|
+
font-size: 100%;
|
|
132
|
+
font: inherit;
|
|
133
|
+
vertical-align: baseline;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
article, aside, details, figcaption, figure,
|
|
137
|
+
footer, header, hgroup, menu, nav, section, main {
|
|
138
|
+
display: block;
|
|
14
139
|
}
|
|
15
140
|
|
|
16
141
|
html {
|
|
17
|
-
|
|
142
|
+
box-sizing: border-box;
|
|
143
|
+
-webkit-text-size-adjust: 100%;
|
|
144
|
+
word-break: normal;
|
|
145
|
+
-moz-tab-size: 4;
|
|
146
|
+
tab-size: 4;
|
|
147
|
+
height: 100%;
|
|
18
148
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
149
|
+
|
|
150
|
+
body {
|
|
151
|
+
min-height: 100%;
|
|
152
|
+
margin: 0;
|
|
153
|
+
position: absolute;
|
|
154
|
+
height: 100vh;
|
|
155
|
+
width: 100vw;
|
|
23
156
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
157
|
+
|
|
158
|
+
html, body {
|
|
159
|
+
height: 100%;
|
|
160
|
+
margin: 0;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
*,
|
|
164
|
+
::before,
|
|
165
|
+
::after {
|
|
166
|
+
background-repeat: no-repeat;
|
|
167
|
+
box-sizing: inherit;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
::before,
|
|
171
|
+
::after {
|
|
172
|
+
text-decoration: inherit;
|
|
173
|
+
vertical-align: inherit;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
* {
|
|
177
|
+
padding: 0;
|
|
178
|
+
margin: 0;
|
|
28
179
|
}
|
|
29
180
|
|
|
30
|
-
/**
|
|
31
|
-
* unit.gl
|
|
32
|
-
*
|
|
33
|
-
* @description Layout Engine
|
|
34
|
-
* @author Scape Agency (https://www.scape.agency)
|
|
35
|
-
* @version v1.0.0
|
|
36
|
-
* @copyright 2020-2024 Scape Agency (https://www.scape.agency)
|
|
37
|
-
* @website https://www.unit.gl/
|
|
38
|
-
* @repository https://github.com/scape-agency/unit.gl/
|
|
39
|
-
* @license Apache 2.0 License (https://github.com/scape-agency/unit.gl/blob/main/LICENSE)
|
|
40
|
-
*/
|
|
41
|
-
/**
|
|
42
|
-
* unit.gl
|
|
43
|
-
*
|
|
44
|
-
* @description Layout Engine
|
|
45
|
-
* @author Scape Agency (https://www.scape.agency)
|
|
46
|
-
* @version v1.0.0
|
|
47
|
-
* @copyright 2020-2024 Scape Agency (https://www.scape.agency)
|
|
48
|
-
* @website https://www.unit.gl/
|
|
49
|
-
* @repository https://github.com/scape-agency/unit.gl/
|
|
50
|
-
* @license Apache 2.0 License (https://github.com/scape-agency/unit.gl/blob/main/LICENSE)
|
|
51
|
-
*/
|
|
52
|
-
/**
|
|
53
|
-
* unit.gl
|
|
54
|
-
*
|
|
55
|
-
* @description Layout Engine
|
|
56
|
-
* @author Scape Agency (https://www.scape.agency)
|
|
57
|
-
* @version v1.0.0
|
|
58
|
-
* @copyright 2020-2024 Scape Agency (https://www.scape.agency)
|
|
59
|
-
* @website https://www.unit.gl/
|
|
60
|
-
* @repository https://github.com/scape-agency/unit.gl/
|
|
61
|
-
* @license Apache 2.0 License (https://github.com/scape-agency/unit.gl/blob/main/LICENSE)
|
|
62
|
-
*/
|
|
63
181
|
.ratio_1x1 {
|
|
64
182
|
aspect-ratio: 1;
|
|
65
183
|
width: 100%;
|
|
@@ -268,294 +386,17 @@ html {
|
|
|
268
386
|
display: inline-block;
|
|
269
387
|
}
|
|
270
388
|
|
|
271
|
-
/**
|
|
272
|
-
* unit.gl
|
|
273
|
-
*
|
|
274
|
-
* @description Layout Engine
|
|
275
|
-
* @author Scape Agency (https://www.scape.agency)
|
|
276
|
-
* @version v1.0.0
|
|
277
|
-
* @copyright 2020-2024 Scape Agency (https://www.scape.agency)
|
|
278
|
-
* @website https://www.unit.gl/
|
|
279
|
-
* @repository https://github.com/scape-agency/unit.gl/
|
|
280
|
-
* @license Apache 2.0 License (https://github.com/scape-agency/unit.gl/blob/main/LICENSE)
|
|
281
|
-
*/
|
|
282
|
-
/**
|
|
283
|
-
* unit.gl
|
|
284
|
-
*
|
|
285
|
-
* @description Layout Engine
|
|
286
|
-
* @author Scape Agency (https://www.scape.agency)
|
|
287
|
-
* @version v1.0.0
|
|
288
|
-
* @copyright 2020-2024 Scape Agency (https://www.scape.agency)
|
|
289
|
-
* @website https://www.unit.gl/
|
|
290
|
-
* @repository https://github.com/scape-agency/unit.gl/
|
|
291
|
-
* @license Apache 2.0 License (https://github.com/scape-agency/unit.gl/blob/main/LICENSE)
|
|
292
|
-
*/
|
|
293
|
-
/**
|
|
294
|
-
* unit.gl
|
|
295
|
-
*
|
|
296
|
-
* @description Layout Engine
|
|
297
|
-
* @author Scape Agency (https://www.scape.agency)
|
|
298
|
-
* @version v1.0.0
|
|
299
|
-
* @copyright 2020-2024 Scape Agency (https://www.scape.agency)
|
|
300
|
-
* @website https://www.unit.gl/
|
|
301
|
-
* @repository https://github.com/scape-agency/unit.gl/
|
|
302
|
-
* @license Apache 2.0 License (https://github.com/scape-agency/unit.gl/blob/main/LICENSE)
|
|
303
|
-
*/
|
|
304
|
-
.guide {
|
|
305
|
-
position: absolute;
|
|
306
|
-
top: 0;
|
|
307
|
-
left: 0;
|
|
308
|
-
width: 100%;
|
|
309
|
-
height: 100%;
|
|
310
|
-
margin: 0;
|
|
311
|
-
pointer-events: none;
|
|
312
|
-
z-index: 9999;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
.guide_graph {
|
|
316
|
-
position: absolute;
|
|
317
|
-
top: 0;
|
|
318
|
-
left: 0;
|
|
319
|
-
width: 100%;
|
|
320
|
-
height: 100%;
|
|
321
|
-
margin: 0;
|
|
322
|
-
pointer-events: none;
|
|
323
|
-
z-index: 9999;
|
|
324
|
-
background-size: 0.25rem 0.25rem;
|
|
325
|
-
background-image: repeating-linear-gradient(to bottom, rgba(50, 50, 50, 0.25) 0 1px, transparent 1px 100%), repeating-linear-gradient(to right, rgba(50, 50, 50, 0.25) 0 1px, transparent 1px 100%);
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
.guide_baseline {
|
|
329
|
-
position: absolute;
|
|
330
|
-
top: 0;
|
|
331
|
-
left: 0;
|
|
332
|
-
width: 100%;
|
|
333
|
-
height: 100%;
|
|
334
|
-
margin: 0;
|
|
335
|
-
pointer-events: none;
|
|
336
|
-
z-index: 9999;
|
|
337
|
-
background-size: 100% 1.5rem;
|
|
338
|
-
background-image: repeating-linear-gradient(to bottom, cyan 0 1px, transparent 1px 100%);
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
/**
|
|
342
|
-
* unit.gl
|
|
343
|
-
*
|
|
344
|
-
* @description Layout Engine
|
|
345
|
-
* @author Scape Agency (https://www.scape.agency)
|
|
346
|
-
* @version v1.0.0
|
|
347
|
-
* @copyright 2020-2024 Scape Agency (https://www.scape.agency)
|
|
348
|
-
* @website https://www.unit.gl/
|
|
349
|
-
* @repository https://github.com/scape-agency/unit.gl/
|
|
350
|
-
* @license Apache 2.0 License (https://github.com/scape-agency/unit.gl/blob/main/LICENSE)
|
|
351
|
-
*/
|
|
352
|
-
/**
|
|
353
|
-
* unit.gl
|
|
354
|
-
*
|
|
355
|
-
* @description Layout Engine
|
|
356
|
-
* @author Scape Agency (https://www.scape.agency)
|
|
357
|
-
* @version v1.0.0
|
|
358
|
-
* @copyright 2020-2024 Scape Agency (https://www.scape.agency)
|
|
359
|
-
* @website https://www.unit.gl/
|
|
360
|
-
* @repository https://github.com/scape-agency/unit.gl/
|
|
361
|
-
* @license Apache 2.0 License (https://github.com/scape-agency/unit.gl/blob/main/LICENSE)
|
|
362
|
-
*/
|
|
363
|
-
*,
|
|
364
|
-
a,
|
|
365
|
-
abbr,
|
|
366
|
-
acronym,
|
|
367
|
-
address,
|
|
368
|
-
applet,
|
|
369
|
-
area,
|
|
370
|
-
article,
|
|
371
|
-
aside,
|
|
372
|
-
audio,
|
|
373
|
-
b,
|
|
374
|
-
base,
|
|
375
|
-
basefont,
|
|
376
|
-
bb,
|
|
377
|
-
bdo,
|
|
378
|
-
big,
|
|
379
|
-
blockquote,
|
|
380
|
-
body,
|
|
381
|
-
br,
|
|
382
|
-
button,
|
|
383
|
-
canvas,
|
|
384
|
-
caption,
|
|
385
|
-
center,
|
|
386
|
-
cite,
|
|
387
|
-
code,
|
|
388
|
-
col,
|
|
389
|
-
colgroup,
|
|
390
|
-
command,
|
|
391
|
-
datalist,
|
|
392
|
-
dd,
|
|
393
|
-
del,
|
|
394
|
-
details,
|
|
395
|
-
dfn,
|
|
396
|
-
dialog,
|
|
397
|
-
dir,
|
|
398
|
-
div,
|
|
399
|
-
dl,
|
|
400
|
-
dt,
|
|
401
|
-
em,
|
|
402
|
-
embed,
|
|
403
|
-
eventsource,
|
|
404
|
-
fieldset,
|
|
405
|
-
figcaption,
|
|
406
|
-
figure,
|
|
407
|
-
font,
|
|
408
|
-
footer,
|
|
409
|
-
form,
|
|
410
|
-
frame,
|
|
411
|
-
frameset,
|
|
412
|
-
h1,
|
|
413
|
-
h2,
|
|
414
|
-
h3,
|
|
415
|
-
h4,
|
|
416
|
-
h5,
|
|
417
|
-
h6,
|
|
418
|
-
head,
|
|
419
|
-
header,
|
|
420
|
-
hgroup,
|
|
421
|
-
hr,
|
|
422
|
-
html,
|
|
423
|
-
i,
|
|
424
|
-
iframe,
|
|
425
|
-
img,
|
|
426
|
-
input,
|
|
427
|
-
ins,
|
|
428
|
-
isindex,
|
|
429
|
-
kbd,
|
|
430
|
-
keygen,
|
|
431
|
-
label,
|
|
432
|
-
legend,
|
|
433
|
-
li,
|
|
434
|
-
link,
|
|
435
|
-
map,
|
|
436
|
-
mark,
|
|
437
|
-
menu,
|
|
438
|
-
meta,
|
|
439
|
-
meter,
|
|
440
|
-
nav,
|
|
441
|
-
noframes,
|
|
442
|
-
noscript,
|
|
443
|
-
object,
|
|
444
|
-
ol,
|
|
445
|
-
optgroup,
|
|
446
|
-
option,
|
|
447
|
-
output,
|
|
448
|
-
p,
|
|
449
|
-
param,
|
|
450
|
-
pre,
|
|
451
|
-
progress,
|
|
452
|
-
q,
|
|
453
|
-
rp,
|
|
454
|
-
rt,
|
|
455
|
-
ruby,
|
|
456
|
-
s,
|
|
457
|
-
samp,
|
|
458
|
-
script,
|
|
459
|
-
section,
|
|
460
|
-
select,
|
|
461
|
-
small,
|
|
462
|
-
source,
|
|
463
|
-
span,
|
|
464
|
-
strike,
|
|
465
|
-
strong,
|
|
466
|
-
style,
|
|
467
|
-
sub,
|
|
468
|
-
sup,
|
|
469
|
-
table,
|
|
470
|
-
tbody,
|
|
471
|
-
td,
|
|
472
|
-
textarea,
|
|
473
|
-
tfoot,
|
|
474
|
-
th,
|
|
475
|
-
thead,
|
|
476
|
-
time,
|
|
477
|
-
title,
|
|
478
|
-
tr,
|
|
479
|
-
track,
|
|
480
|
-
tt,
|
|
481
|
-
u,
|
|
482
|
-
ul,
|
|
483
|
-
var,
|
|
484
|
-
video,
|
|
485
|
-
wbr {
|
|
486
|
-
margin: 0;
|
|
487
|
-
-webkit-margin-before: 0;
|
|
488
|
-
margin-block-start: 0;
|
|
489
|
-
-webkit-margin-after: 0;
|
|
490
|
-
margin-block-end: 0;
|
|
491
|
-
-webkit-margin-start: 0;
|
|
492
|
-
margin-inline-start: 0;
|
|
493
|
-
-webkit-margin-end: 0;
|
|
494
|
-
margin-inline-end: 0;
|
|
495
|
-
padding: 0;
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
/**
|
|
499
|
-
* unit.gl
|
|
500
|
-
*
|
|
501
|
-
* @description Layout Engine
|
|
502
|
-
* @author Scape Agency (https://www.scape.agency)
|
|
503
|
-
* @version v1.0.0
|
|
504
|
-
* @copyright 2020-2024 Scape Agency (https://www.scape.agency)
|
|
505
|
-
* @website https://www.unit.gl/
|
|
506
|
-
* @repository https://github.com/scape-agency/unit.gl/
|
|
507
|
-
* @license Apache 2.0 License (https://github.com/scape-agency/unit.gl/blob/main/LICENSE)
|
|
508
|
-
*/
|
|
509
389
|
html {
|
|
510
|
-
|
|
511
|
-
-webkit-text-size-adjust: 100%; /* Prevent adjustments of font size after orientation changes in iOS */
|
|
512
|
-
word-break: normal;
|
|
513
|
-
-moz-tab-size: 4;
|
|
514
|
-
-o-tab-size: 4;
|
|
515
|
-
tab-size: 4;
|
|
516
|
-
height: 100%;
|
|
517
|
-
}
|
|
518
|
-
|
|
519
|
-
body {
|
|
520
|
-
min-height: 100%;
|
|
521
|
-
margin: 0;
|
|
522
|
-
position: absolute;
|
|
523
|
-
height: 100vh;
|
|
524
|
-
width: 100vw;
|
|
525
|
-
}
|
|
526
|
-
|
|
527
|
-
html, body {
|
|
528
|
-
height: 100%;
|
|
529
|
-
margin: 0;
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
*,
|
|
533
|
-
::before,
|
|
534
|
-
::after {
|
|
535
|
-
background-repeat: no-repeat; /* Set `background-repeat: no-repeat` to all elements and pseudo elements */
|
|
536
|
-
box-sizing: inherit;
|
|
390
|
+
font-size: 12px;
|
|
537
391
|
}
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
vertical-align: inherit;
|
|
392
|
+
@media screen and (min-width: 320px) {
|
|
393
|
+
html {
|
|
394
|
+
font-size: calc(12px + 12 * (100vw - 320px) / 1120);
|
|
395
|
+
}
|
|
543
396
|
}
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
397
|
+
@media screen and (min-width: 1440px) {
|
|
398
|
+
html {
|
|
399
|
+
font-size: 24px;
|
|
400
|
+
}
|
|
548
401
|
}
|
|
549
|
-
|
|
550
|
-
/**
|
|
551
|
-
* unit.gl
|
|
552
|
-
*
|
|
553
|
-
* @description Layout Engine
|
|
554
|
-
* @author Scape Agency (https://www.scape.agency)
|
|
555
|
-
* @version v1.0.0
|
|
556
|
-
* @copyright 2020-2024 Scape Agency (https://www.scape.agency)
|
|
557
|
-
* @website https://www.unit.gl/
|
|
558
|
-
* @repository https://github.com/scape-agency/unit.gl/
|
|
559
|
-
* @license Apache 2.0 License (https://github.com/scape-agency/unit.gl/blob/main/LICENSE)
|
|
560
|
-
*/
|
|
561
402
|
/*# sourceMappingURL=to.css.map */
|
package/css/unit.gl.min.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
*,a,abbr,acronym,address,applet,area,article,aside,audio,b,base,basefont,bb,bdo,big,blockquote,body,br,button,canvas,caption,center,cite,code,col,colgroup,command,datalist,dd,del,details,dfn,dialog,dir,div,dl,dt,em,embed,eventsource,fieldset,figcaption,figure,font,footer,form,frame,frameset,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,i,iframe,img,input,ins,isindex,kbd,keygen,label,legend,li,link,map,mark,menu,meta,meter,nav,noframes,noscript,object,ol,optgroup,option,output,p,param,pre,progress,q,rp,rt,ruby,s,samp,script,section,select,small,source,span,strike,strong,style,sub,sup,table,tbody,td,textarea,tfoot,th,thead,time,title,tr,track,tt,u,ul,var,video,wbr{border:0;font-size:100%;font:inherit;margin:0;margin-block-end:0;margin-block-start:0;margin-inline-end:0;margin-inline-start:0;padding:0;vertical-align:initial}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section{display:block}html{box-sizing:border-box;-webkit-text-size-adjust:100%;height:100%;-moz-tab-size:4;tab-size:4;word-break:normal}body{height:100vh;margin:0;min-height:100%;position:absolute;width:100vw}body,html{height:100%;margin:0}*,:after,:before{background-repeat:no-repeat;box-sizing:inherit}:after,:before{text-decoration:inherit;vertical-align:inherit}*{margin:0;padding:0}.ratio_1x1{aspect-ratio:1}.ratio_1x1,.ratio_1x2{display:inline-block;overflow:hidden;position:relative;width:100%}.ratio_1x2{aspect-ratio:.5}.ratio_2x1{aspect-ratio:2}.ratio_1x3,.ratio_2x1{display:inline-block;overflow:hidden;position:relative;width:100%}.ratio_1x3{aspect-ratio:.3333333333}.ratio_3x1{aspect-ratio:3}.ratio_1x4,.ratio_3x1{display:inline-block;overflow:hidden;position:relative;width:100%}.ratio_1x4{aspect-ratio:.25}.ratio_4x1{aspect-ratio:4}.ratio_3x2,.ratio_4x1{display:inline-block;overflow:hidden;position:relative;width:100%}.ratio_3x2{aspect-ratio:1.5}.ratio_2x3{aspect-ratio:.6666666667}.ratio_2x3,.ratio_4x3{display:inline-block;overflow:hidden;position:relative;width:100%}.ratio_4x3{aspect-ratio:1.3333333333}.ratio_3x4{aspect-ratio:.75}.ratio_16x9,.ratio_3x4{display:inline-block;overflow:hidden;position:relative;width:100%}.ratio_16x9{aspect-ratio:1.7777777778}.ratio_16x10{aspect-ratio:1.6}.ratio_16x10,.ratio_p_1x1{display:inline-block;overflow:hidden;position:relative;width:100%}.ratio_p_1x1{padding-bottom:100%}.ratio_p_1x2{padding-bottom:200%}.ratio_p_1x2,.ratio_p_2x1{display:inline-block;overflow:hidden;position:relative;width:100%}.ratio_p_2x1{padding-bottom:50%}.ratio_p_1x3{padding-bottom:300%}.ratio_p_1x3,.ratio_p_3x1{display:inline-block;overflow:hidden;position:relative;width:100%}.ratio_p_3x1{padding-bottom:33.33%}.ratio_p_1x4{padding-bottom:400%}.ratio_p_1x4,.ratio_p_4x1{display:inline-block;overflow:hidden;position:relative;width:100%}.ratio_p_4x1{padding-bottom:25%}.ratio_p_3x2{padding-bottom:66.67%}.ratio_p_2x3,.ratio_p_3x2{display:inline-block;overflow:hidden;position:relative;width:100%}.ratio_p_2x3{padding-bottom:150%}.ratio_p_4x3{padding-bottom:75%}.ratio_p_3x4,.ratio_p_4x3{display:inline-block;overflow:hidden;position:relative;width:100%}.ratio_p_3x4{padding-bottom:133.33%}.ratio_p_16x9{padding-bottom:56.25%}.ratio_p_16x10,.ratio_p_16x9{display:inline-block;overflow:hidden;position:relative;width:100%}.ratio_p_16x10{padding-bottom:62.5%}html{font-size:12px}@media screen and (min-width:320px){html{font-size:calc(8.57143px + 1.07143vw)}}@media screen and (min-width:1440px){html{font-size:24px}}
|
|
2
2
|
/*# sourceMappingURL=to.css.map */
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unit.gl",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "Layout Engine.",
|
|
3
|
+
"version": "0.0.38",
|
|
4
|
+
"description": "Dynamic Layout Engine.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"unit.gl",
|
|
7
7
|
"unit",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"framework",
|
|
18
18
|
"web"
|
|
19
19
|
],
|
|
20
|
-
"license": "
|
|
20
|
+
"license": "MIT",
|
|
21
21
|
"homepage": "https://www.unit.gl/",
|
|
22
22
|
"funding": [
|
|
23
23
|
{
|
|
@@ -50,12 +50,18 @@
|
|
|
50
50
|
"ts/**/*.ts",
|
|
51
51
|
"!.DS_Store"
|
|
52
52
|
],
|
|
53
|
-
"author": "Lars van Vianen <lars@vianen.com> (https://vianen.com)",
|
|
53
|
+
"author": "Lars van Vianen <lars@vianen.com> (https://www.vianen.com)",
|
|
54
54
|
"contributors": [
|
|
55
55
|
"Scape Agency <info@scape.agency>"
|
|
56
56
|
],
|
|
57
57
|
"repository": {
|
|
58
58
|
"type": "git",
|
|
59
|
-
"url": "git+https://github.com/
|
|
59
|
+
"url": "git+https://github.com/stylescape/unit.gl.git"
|
|
60
|
+
},
|
|
61
|
+
"exports": {
|
|
62
|
+
".": {
|
|
63
|
+
"sass": "./scss/index.scss",
|
|
64
|
+
"typescript": "./ts/index.scss"
|
|
65
|
+
}
|
|
60
66
|
}
|
|
61
67
|
}
|
package/scss/_global.scss
CHANGED
|
@@ -1,26 +1,9 @@
|
|
|
1
|
-
// Copyright 2024 Scape Agency BV
|
|
2
|
-
|
|
3
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
// you may not use this file except in compliance with the License.
|
|
5
|
-
// You may obtain a copy of the License at
|
|
6
|
-
|
|
7
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
|
|
9
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
// See the License for the specific language governing permissions and
|
|
13
|
-
// limitations under the License.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
@use "variables" as *;
|
|
17
|
-
|
|
18
1
|
// Base | Body
|
|
19
2
|
// ============================================================================
|
|
20
3
|
|
|
21
4
|
html {
|
|
22
5
|
box-sizing: border-box;
|
|
23
|
-
-webkit-text-size-adjust: 100%;
|
|
6
|
+
-webkit-text-size-adjust: 100%; // Prevent adjustments of font size after orientation changes in iOS
|
|
24
7
|
word-break: normal;
|
|
25
8
|
-moz-tab-size: 4;
|
|
26
9
|
tab-size: 4;
|
|
@@ -45,18 +28,18 @@ html, body {
|
|
|
45
28
|
*,
|
|
46
29
|
::before,
|
|
47
30
|
::after {
|
|
48
|
-
background-repeat: no-repeat;
|
|
31
|
+
background-repeat: no-repeat; // Set `background-repeat: no-repeat` to all elements and pseudo elements
|
|
49
32
|
box-sizing: inherit;
|
|
50
33
|
}
|
|
51
34
|
|
|
52
35
|
::before,
|
|
53
36
|
::after {
|
|
54
|
-
text-decoration: inherit;
|
|
37
|
+
text-decoration: inherit; // Inherit text-decoration and vertical align to ::before and ::after pseudo elements
|
|
55
38
|
vertical-align: inherit;
|
|
56
39
|
}
|
|
57
40
|
|
|
58
41
|
* {
|
|
59
|
-
padding: 0;
|
|
42
|
+
padding: 0; // Reset `padding` and `margin` of all elements
|
|
60
43
|
margin: 0;
|
|
61
44
|
}
|
|
62
45
|
|
|
@@ -125,7 +108,4 @@ html, body {
|
|
|
125
108
|
|
|
126
109
|
// // -webkit-font-smoothing: antialiased;
|
|
127
110
|
// // -moz-osx-font-smoothing: grayscale;
|
|
128
|
-
// }
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
111
|
+
// }
|
package/scss/_reset.scss
CHANGED
|
@@ -1,23 +1,8 @@
|
|
|
1
|
-
// Copyright 2024 Scape Agency BV
|
|
2
|
-
|
|
3
|
-
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
// you may not use this file except in compliance with the License.
|
|
5
|
-
// You may obtain a copy of the License at
|
|
6
|
-
|
|
7
|
-
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
|
|
9
|
-
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
// See the License for the specific language governing permissions and
|
|
13
|
-
// limitations under the License.
|
|
14
|
-
|
|
15
|
-
@use "variables" as *;
|
|
16
|
-
|
|
17
1
|
// ============================================================================
|
|
18
2
|
// Base | Reset
|
|
19
3
|
// ============================================================================
|
|
20
4
|
|
|
5
|
+
// Reset margin and padding for all elements
|
|
21
6
|
@mixin reset_bleed {
|
|
22
7
|
margin: 0;
|
|
23
8
|
margin-block-start: 0;
|
|
@@ -25,8 +10,14 @@
|
|
|
25
10
|
margin-inline-start: 0;
|
|
26
11
|
margin-inline-end: 0;
|
|
27
12
|
padding: 0;
|
|
13
|
+
border: 0; // Ensures no borders are applied unless explicitly defined
|
|
14
|
+
font-size: 100%; // Prevent scaling issues by setting default font size
|
|
15
|
+
font: inherit; // Ensures fonts are consistently inherited from parent elements
|
|
16
|
+
vertical-align: baseline; // Aligns elements to the baseline to avoid layout shifts
|
|
28
17
|
}
|
|
29
18
|
|
|
19
|
+
|
|
20
|
+
// Apply the reset mixin to all elements
|
|
30
21
|
*,
|
|
31
22
|
a,
|
|
32
23
|
abbr,
|
|
@@ -154,6 +145,12 @@ wbr
|
|
|
154
145
|
@include reset_bleed;
|
|
155
146
|
}
|
|
156
147
|
|
|
148
|
+
// HTML5 display-role reset for older browsers
|
|
149
|
+
// Ensures HTML5 elements are displayed correctly in older browsers
|
|
150
|
+
article, aside, details, figcaption, figure,
|
|
151
|
+
footer, header, hgroup, menu, nav, section, main {
|
|
152
|
+
display: block;
|
|
153
|
+
}
|
|
157
154
|
|
|
158
155
|
// html, body, div, span, applet, object, iframe,
|
|
159
156
|
// h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|