unit.gl 0.0.39 → 0.1.1
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/README.md +0 -1
- package/css/unit.gl.css +54 -42
- package/css/unit.gl.min.css +1 -1
- package/package.json +2 -22
- package/scss/_reset.scss +20 -12
- package/scss/classes/_guide.scss +35 -40
- package/scss/classes/_guides.scss +141 -0
- package/scss/classes/_index.scss +3 -5
- package/scss/classes/_ratio.scss +3 -5
- package/scss/dev/_banner.scss +4 -7
- package/scss/dev/_index.scss +7 -0
- package/scss/functions/_color.scss +8 -11
- package/scss/functions/_index.scss +18 -11
- package/scss/functions/_layer.scss +6 -10
- package/scss/functions/_ratio.scss +13 -16
- package/scss/functions/_scale.scss +20 -18
- package/scss/functions/_sequence.scss +64 -72
- package/scss/functions/_view.scss +6 -9
- package/scss/functions/math/_arithmetic.scss +21 -30
- package/scss/functions/math/_index.scss +4 -7
- package/scss/functions/unit/_index.scss +8 -7
- package/scss/functions/unit/_unit_conversion.scss +42 -29
- package/scss/functions/unit/_unit_functions.scss +55 -43
- package/scss/index.scss +0 -1
- package/scss/maps/_color.scss +14 -14
- package/scss/maps/_index.scss +26 -0
- package/scss/mixins/_device.scss +9 -10
- package/scss/mixins/_display.scss +52 -57
- package/scss/mixins/_guide.scss +59 -81
- package/scss/mixins/_helper.scss +74 -92
- package/scss/mixins/_index.scss +12 -14
- package/scss/mixins/_paper.scss +10 -11
- package/scss/mixins/_ratio.scss +172 -76
- package/scss/mixins/_unit.scss +33 -23
- package/scss/mixins/_view.scss +47 -54
- package/scss/{_global.scss → tags/_global.scss} +12 -11
- package/scss/tags/_index.scss +5 -6
- package/scss/tags/_unit.scss +4 -11
- package/scss/variables/_color.scss +18 -20
- package/scss/variables/_device.scss +179 -73
- package/scss/variables/_index.scss +21 -22
- package/scss/variables/_layer.scss +26 -35
- package/scss/variables/_paper.scss +1022 -241
- package/scss/variables/_ratio.scss +148 -90
- package/scss/variables/_scale.scss +141 -115
- package/scss/variables/_unit.scss +20 -35
- package/scss/variables/_view.scss +54 -57
- package/ts/AspectRatio.ts +27 -6
- package/ts/Border.ts +35 -4
- package/ts/BoxModel.ts +32 -4
- package/ts/FlexContainer.ts +36 -9
- package/ts/Grid.ts +28 -3
- package/ts/GridContainer.ts +29 -3
- package/ts/Layout.ts +37 -7
- package/ts/Position.ts +29 -4
- package/ts/Rectangle.ts +26 -3
- package/ts/ResponsiveImage.ts +22 -3
- package/ts/ResponsiveScale.ts +25 -2
- package/ts/Size.ts +25 -3
- package/ts/Spacing.ts +45 -7
- package/ts/Transform.ts +37 -4
- package/ts/Typography.ts +40 -6
- package/ts/Unit.ts +34 -10
- package/ts/Viewport.ts +31 -3
- package/ts/index.ts +1 -16
- package/scss/utilities/_guides.scss +0 -103
- package/scss/utilities/_index.scss +0 -6
package/README.md
CHANGED
package/css/unit.gl.css
CHANGED
|
@@ -133,51 +133,21 @@ wbr {
|
|
|
133
133
|
vertical-align: baseline;
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
article,
|
|
137
|
-
|
|
136
|
+
article,
|
|
137
|
+
aside,
|
|
138
|
+
details,
|
|
139
|
+
figcaption,
|
|
140
|
+
figure,
|
|
141
|
+
footer,
|
|
142
|
+
header,
|
|
143
|
+
hgroup,
|
|
144
|
+
menu,
|
|
145
|
+
nav,
|
|
146
|
+
section,
|
|
147
|
+
main {
|
|
138
148
|
display: block;
|
|
139
149
|
}
|
|
140
150
|
|
|
141
|
-
html {
|
|
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%;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
body {
|
|
151
|
-
min-height: 100%;
|
|
152
|
-
margin: 0;
|
|
153
|
-
position: absolute;
|
|
154
|
-
height: 100vh;
|
|
155
|
-
width: 100vw;
|
|
156
|
-
}
|
|
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;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
151
|
.ratio_1x1 {
|
|
182
152
|
aspect-ratio: 1;
|
|
183
153
|
width: 100%;
|
|
@@ -399,4 +369,46 @@ html {
|
|
|
399
369
|
font-size: 24px;
|
|
400
370
|
}
|
|
401
371
|
}
|
|
372
|
+
|
|
373
|
+
html {
|
|
374
|
+
box-sizing: border-box;
|
|
375
|
+
-webkit-text-size-adjust: 100%;
|
|
376
|
+
word-break: normal;
|
|
377
|
+
-moz-tab-size: 4;
|
|
378
|
+
-o-tab-size: 4;
|
|
379
|
+
tab-size: 4;
|
|
380
|
+
height: 100%;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
body {
|
|
384
|
+
min-height: 100%;
|
|
385
|
+
margin: 0;
|
|
386
|
+
position: absolute;
|
|
387
|
+
height: 100vh;
|
|
388
|
+
width: 100vw;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
html,
|
|
392
|
+
body {
|
|
393
|
+
height: 100%;
|
|
394
|
+
margin: 0;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
*,
|
|
398
|
+
::before,
|
|
399
|
+
::after {
|
|
400
|
+
background-repeat: no-repeat;
|
|
401
|
+
box-sizing: inherit;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
::before,
|
|
405
|
+
::after {
|
|
406
|
+
text-decoration: inherit;
|
|
407
|
+
vertical-align: inherit;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
* {
|
|
411
|
+
padding: 0;
|
|
412
|
+
margin: 0;
|
|
413
|
+
}
|
|
402
414
|
/*# sourceMappingURL=to.css.map */
|
package/css/unit.gl.min.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
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:
|
|
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:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section{display:block}.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}}html{box-sizing:border-box;-webkit-text-size-adjust:100%;height:100%;-moz-tab-size:4;-o-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}
|
|
2
2
|
/*# sourceMappingURL=to.css.map */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unit.gl",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Dynamic Layout Engine.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"unit.gl",
|
|
@@ -19,12 +19,6 @@
|
|
|
19
19
|
],
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"homepage": "https://www.unit.gl/",
|
|
22
|
-
"funding": [
|
|
23
|
-
{
|
|
24
|
-
"type": "github",
|
|
25
|
-
"url": "https://github.com/sponsors/scape-foundation"
|
|
26
|
-
}
|
|
27
|
-
],
|
|
28
22
|
"main": "js/index.js",
|
|
29
23
|
"types": "js/index.d.ts",
|
|
30
24
|
"files": [
|
|
@@ -48,19 +42,5 @@
|
|
|
48
42
|
"tex/**/*.tex",
|
|
49
43
|
"ts/**/*.ts",
|
|
50
44
|
"!.DS_Store"
|
|
51
|
-
]
|
|
52
|
-
"author": "Lars van Vianen <lars@vianen.com> (https://www.vianen.com)",
|
|
53
|
-
"contributors": [
|
|
54
|
-
"Scape Agency <info@scape.agency>"
|
|
55
|
-
],
|
|
56
|
-
"repository": {
|
|
57
|
-
"type": "git",
|
|
58
|
-
"url": "git+https://github.com/stylescape/unit.gl.git"
|
|
59
|
-
},
|
|
60
|
-
"exports": {
|
|
61
|
-
".": {
|
|
62
|
-
"sass": "./scss/index.scss",
|
|
63
|
-
"typescript": "./ts/index.scss"
|
|
64
|
-
}
|
|
65
|
-
}
|
|
45
|
+
]
|
|
66
46
|
}
|
package/scss/_reset.scss
CHANGED
|
@@ -4,19 +4,18 @@
|
|
|
4
4
|
|
|
5
5
|
// Reset margin and padding for all elements
|
|
6
6
|
@mixin reset_bleed {
|
|
7
|
-
margin:
|
|
8
|
-
margin-block-start:
|
|
9
|
-
margin-block-end:
|
|
10
|
-
margin-inline-start:
|
|
11
|
-
margin-inline-end:
|
|
12
|
-
padding:
|
|
7
|
+
margin: 0;
|
|
8
|
+
margin-block-start: 0;
|
|
9
|
+
margin-block-end: 0;
|
|
10
|
+
margin-inline-start: 0;
|
|
11
|
+
margin-inline-end: 0;
|
|
12
|
+
padding: 0;
|
|
13
13
|
border: 0; // Ensures no borders are applied unless explicitly defined
|
|
14
14
|
font-size: 100%; // Prevent scaling issues by setting default font size
|
|
15
15
|
font: inherit; // Ensures fonts are consistently inherited from parent elements
|
|
16
16
|
vertical-align: baseline; // Aligns elements to the baseline to avoid layout shifts
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
|
|
20
19
|
// Apply the reset mixin to all elements
|
|
21
20
|
*,
|
|
22
21
|
a,
|
|
@@ -118,7 +117,7 @@ section,
|
|
|
118
117
|
select,
|
|
119
118
|
small,
|
|
120
119
|
source,
|
|
121
|
-
span,
|
|
120
|
+
span,
|
|
122
121
|
strike,
|
|
123
122
|
strong,
|
|
124
123
|
style,
|
|
@@ -140,15 +139,24 @@ u,
|
|
|
140
139
|
ul,
|
|
141
140
|
var,
|
|
142
141
|
video,
|
|
143
|
-
wbr
|
|
144
|
-
{
|
|
142
|
+
wbr {
|
|
145
143
|
@include reset_bleed;
|
|
146
144
|
}
|
|
147
145
|
|
|
148
146
|
// HTML5 display-role reset for older browsers
|
|
149
147
|
// Ensures HTML5 elements are displayed correctly in older browsers
|
|
150
|
-
article,
|
|
151
|
-
|
|
148
|
+
article,
|
|
149
|
+
aside,
|
|
150
|
+
details,
|
|
151
|
+
figcaption,
|
|
152
|
+
figure,
|
|
153
|
+
footer,
|
|
154
|
+
header,
|
|
155
|
+
hgroup,
|
|
156
|
+
menu,
|
|
157
|
+
nav,
|
|
158
|
+
section,
|
|
159
|
+
main {
|
|
152
160
|
display: block;
|
|
153
161
|
}
|
|
154
162
|
|
package/scss/classes/_guide.scss
CHANGED
|
@@ -3,27 +3,26 @@
|
|
|
3
3
|
// ============================================================================
|
|
4
4
|
|
|
5
5
|
////
|
|
6
|
-
///
|
|
6
|
+
///
|
|
7
7
|
/// Guide Class Module
|
|
8
8
|
/// ===========================================================================
|
|
9
|
-
///
|
|
9
|
+
///
|
|
10
10
|
/// This module creates utility classes for visual guides, such as grid
|
|
11
11
|
/// overlays and baseline grids, using predefined mixins. These classes can
|
|
12
12
|
/// be applied directly in your HTML for rapid prototyping or debugging.
|
|
13
|
-
///
|
|
13
|
+
///
|
|
14
14
|
/// Dependencies:
|
|
15
15
|
/// - Mixins from the Guides module
|
|
16
|
-
///
|
|
16
|
+
///
|
|
17
17
|
/// @group Guides
|
|
18
18
|
/// @author Scape Agency
|
|
19
19
|
/// @link https://unit.gl
|
|
20
20
|
/// @since 0.1.0 initial release
|
|
21
21
|
/// @todo None
|
|
22
22
|
/// @access public
|
|
23
|
-
///
|
|
23
|
+
///
|
|
24
24
|
////
|
|
25
25
|
|
|
26
|
-
|
|
27
26
|
// ============================================================================
|
|
28
27
|
// Use
|
|
29
28
|
// ============================================================================
|
|
@@ -31,16 +30,15 @@
|
|
|
31
30
|
@use "../variables" as *;
|
|
32
31
|
@use "../mixins" as *;
|
|
33
32
|
|
|
34
|
-
|
|
35
33
|
// ============================================================================
|
|
36
34
|
// Classes
|
|
37
35
|
// ============================================================================
|
|
38
36
|
|
|
39
|
-
///
|
|
37
|
+
///
|
|
40
38
|
/// Applies a full-page guide overlay with a high z-index.
|
|
41
|
-
///
|
|
39
|
+
///
|
|
42
40
|
/// @name guide_overlay
|
|
43
|
-
///
|
|
41
|
+
///
|
|
44
42
|
.guide {
|
|
45
43
|
@include guide;
|
|
46
44
|
}
|
|
@@ -48,79 +46,76 @@
|
|
|
48
46
|
@include guide;
|
|
49
47
|
}
|
|
50
48
|
|
|
51
|
-
///
|
|
49
|
+
///
|
|
52
50
|
/// Applies a grid overlay with a customizable grid size and color.
|
|
53
|
-
///
|
|
51
|
+
///
|
|
54
52
|
/// @name guide_graph
|
|
55
|
-
///
|
|
53
|
+
///
|
|
56
54
|
/// @example HTML
|
|
57
55
|
/// <div class="guide_graph"></div>
|
|
58
|
-
///
|
|
56
|
+
///
|
|
59
57
|
.guide_graph {
|
|
60
58
|
@include guide_graph($rhythm_base); // Default size, customize as needed
|
|
61
59
|
}
|
|
62
60
|
|
|
63
|
-
|
|
64
|
-
///
|
|
61
|
+
///
|
|
65
62
|
/// Applies a baseline grid overlay to maintain vertical rhythm.
|
|
66
|
-
///
|
|
63
|
+
///
|
|
67
64
|
/// @name guide_baseline
|
|
68
|
-
///
|
|
65
|
+
///
|
|
69
66
|
/// @example HTML
|
|
70
67
|
/// <div class="guide_baseline"></div>
|
|
71
|
-
///
|
|
68
|
+
///
|
|
72
69
|
.guide_baseline {
|
|
73
|
-
@include guide_baseline(
|
|
70
|
+
@include guide_baseline(
|
|
71
|
+
$line_height_base
|
|
72
|
+
); // Default size, customize as needed
|
|
74
73
|
}
|
|
75
74
|
|
|
76
|
-
|
|
77
|
-
///
|
|
75
|
+
///
|
|
78
76
|
/// Applies a full baseline grid with both vertical and horizontal lines.
|
|
79
|
-
///
|
|
77
|
+
///
|
|
80
78
|
/// @name baseline_grid
|
|
81
|
-
///
|
|
79
|
+
///
|
|
82
80
|
/// @example HTML
|
|
83
81
|
/// <div class="baseline-grid"></div>
|
|
84
|
-
///
|
|
82
|
+
///
|
|
85
83
|
.baseline_grid {
|
|
86
84
|
@include baseline_grid(60px, 24px); // Default sizes, customize as needed
|
|
87
85
|
}
|
|
88
86
|
|
|
89
|
-
|
|
90
|
-
///
|
|
87
|
+
///
|
|
91
88
|
/// Creates a centered guide box for alignment checks.
|
|
92
|
-
///
|
|
89
|
+
///
|
|
93
90
|
/// @name guide_centered
|
|
94
|
-
///
|
|
91
|
+
///
|
|
95
92
|
/// @example HTML
|
|
96
93
|
/// <div class="guide_centered"></div>
|
|
97
|
-
///
|
|
94
|
+
///
|
|
98
95
|
.guide_centered {
|
|
99
96
|
@include guide_centered(200px, 200px); // Default size, customize as needed
|
|
100
97
|
}
|
|
101
98
|
|
|
102
|
-
|
|
103
|
-
///
|
|
99
|
+
///
|
|
104
100
|
/// Visualizes the margin area around content.
|
|
105
|
-
///
|
|
101
|
+
///
|
|
106
102
|
/// @name guide_margin
|
|
107
|
-
///
|
|
103
|
+
///
|
|
108
104
|
/// @example HTML
|
|
109
105
|
/// <div class="guide_margin"></div>
|
|
110
|
-
///
|
|
106
|
+
///
|
|
111
107
|
.guide_margin {
|
|
112
108
|
@include guide_margin(20px); // Default margin size, customize as needed
|
|
113
109
|
}
|
|
114
110
|
|
|
115
|
-
|
|
116
|
-
///
|
|
111
|
+
///
|
|
117
112
|
/// Visualizes a larger margin area around content.
|
|
118
|
-
///
|
|
113
|
+
///
|
|
119
114
|
/// @name guide_margin)_wide
|
|
120
|
-
///
|
|
115
|
+
///
|
|
121
116
|
/// @example HTML
|
|
122
117
|
/// <div class="guide_margin_wide"></div>
|
|
123
|
-
///
|
|
118
|
+
///
|
|
124
119
|
.guide_margin_wide {
|
|
125
120
|
@include guide_margin(40px); // Wider margin size, customize as needed
|
|
126
121
|
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
@use "../dev" as *;
|
|
2
|
+
@use "../variables" as *;
|
|
3
|
+
@use "../mixins" as *;
|
|
4
|
+
|
|
5
|
+
// ============================================================================
|
|
6
|
+
// Utilities | Guides
|
|
7
|
+
// ============================================================================
|
|
8
|
+
|
|
9
|
+
.guide {
|
|
10
|
+
@include guide;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@mixin guide_graph {
|
|
14
|
+
@include guide;
|
|
15
|
+
background-size: 4 * $q 4 * $q;
|
|
16
|
+
background-image: repeating-linear-gradient(
|
|
17
|
+
rgb(66, 61, 61) 0 1px,
|
|
18
|
+
transparent 1px 100%
|
|
19
|
+
),
|
|
20
|
+
repeating-linear-gradient(
|
|
21
|
+
90deg,
|
|
22
|
+
rgb(66, 61, 61) 0 1px,
|
|
23
|
+
transparent 1px 100%
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.guide_graph {
|
|
28
|
+
@include guide_graph;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@mixin guide_baseline {
|
|
32
|
+
@include guide;
|
|
33
|
+
// background: repeating-linear-gradient(#e66465, #e66465 20px, #9198e5 20px, #9198e5 25px);
|
|
34
|
+
// background: repeating-linear-gradient(transparent, transparent 20px, transparent 20px, transparent 25px);
|
|
35
|
+
// background-repeat: repeat-y;
|
|
36
|
+
background-repeat: repeat;
|
|
37
|
+
|
|
38
|
+
background-size: map-get($baseline, 4) map-get($baseline, 4);
|
|
39
|
+
@include guide;
|
|
40
|
+
background-image: repeating-linear-gradient(
|
|
41
|
+
cyan 0 1px,
|
|
42
|
+
transparent 1px 100%
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.guide_baseline {
|
|
47
|
+
@include guide_baseline;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.baseline-grid {
|
|
51
|
+
@include guide;
|
|
52
|
+
|
|
53
|
+
background-image:
|
|
54
|
+
// -webkit-linear-gradient(0deg, rgba(200,0,0,.2) 40px, transparent 40px),
|
|
55
|
+
-webkit-linear-gradient(
|
|
56
|
+
top,
|
|
57
|
+
rgba(0, 0, 0, 0) 95%,
|
|
58
|
+
rgba(56, 255, 255, 0.8) 100%
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
background-image:
|
|
62
|
+
// -moz-linear-gradient(0deg, rgba(200,0,0,.2) 40px, transparent 40px),
|
|
63
|
+
-moz-linear-gradient(
|
|
64
|
+
top,
|
|
65
|
+
rgba(0, 0, 0, 0) 95%,
|
|
66
|
+
rgba(56, 255, 255, 0.8) 100%
|
|
67
|
+
);
|
|
68
|
+
background-image:
|
|
69
|
+
// -o-linear-gradient(0deg, rgba(200,0,0,.2) 40px, transparent 40px),
|
|
70
|
+
-o-linear-gradient(
|
|
71
|
+
top,
|
|
72
|
+
rgba(0, 0, 0, 0) 95%,
|
|
73
|
+
rgba(56, 255, 255, 0.8) 100%
|
|
74
|
+
);
|
|
75
|
+
|
|
76
|
+
background-size:
|
|
77
|
+
100% 100%,
|
|
78
|
+
100% 100%;
|
|
79
|
+
// background-size: 60px 100%, 100% 22px;
|
|
80
|
+
// background-position: 10px 0px;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// .guide_graph {
|
|
84
|
+
// @include guide;
|
|
85
|
+
// background-image:
|
|
86
|
+
// repeating-linear-gradient(#ccc 0 1px, transparent 1px 100%),
|
|
87
|
+
// repeating-linear-gradient(90deg, #ccc 0 1px, transparent 1px 100%);
|
|
88
|
+
// }
|
|
89
|
+
|
|
90
|
+
// .guide_baseline {
|
|
91
|
+
// @include guide;
|
|
92
|
+
// background-image:
|
|
93
|
+
// repeating-linear-gradient(cyan 0 2px, transparent 2px 100%);
|
|
94
|
+
// }
|
|
95
|
+
|
|
96
|
+
.page {
|
|
97
|
+
border: $q * 2 solid red;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
$body-width: 960px;
|
|
101
|
+
$baseline: 22px;
|
|
102
|
+
@mixin baseline-grid {
|
|
103
|
+
$columns: 16;
|
|
104
|
+
$column-color: rgba(200, 0, 0, 0.2);
|
|
105
|
+
$baseline-color: rgba(56, 255, 255, 0.8);
|
|
106
|
+
|
|
107
|
+
// These are all automatically calculated
|
|
108
|
+
$gutter-width: 20px; // Change if you like
|
|
109
|
+
$gutters: ($columns - 1);
|
|
110
|
+
$column-width: calc($body-width / $columns);
|
|
111
|
+
|
|
112
|
+
background-image:
|
|
113
|
+
-webkit-linear-gradient(
|
|
114
|
+
0deg,
|
|
115
|
+
$column-color $column-width,
|
|
116
|
+
transparent $gutter-width
|
|
117
|
+
),
|
|
118
|
+
-webkit-linear-gradient(top, rgba(0, 0, 0, 0) 95%, $baseline-color 100%);
|
|
119
|
+
background-image:
|
|
120
|
+
-moz-linear-gradient(
|
|
121
|
+
0deg,
|
|
122
|
+
$column-color $column-width,
|
|
123
|
+
transparent $gutter-width
|
|
124
|
+
),
|
|
125
|
+
-moz-linear-gradient(top, rgba(0, 0, 0, 0) 95%, $baseline-color 100%);
|
|
126
|
+
background-image:
|
|
127
|
+
-o-linear-gradient(
|
|
128
|
+
0deg,
|
|
129
|
+
$column-color $column-width,
|
|
130
|
+
transparent $gutter-width
|
|
131
|
+
),
|
|
132
|
+
-o-linear-gradient(top, rgba(0, 0, 0, 0) 95%, $baseline-color 100%);
|
|
133
|
+
background-size:
|
|
134
|
+
($column-width + $gutter-width) 100%,
|
|
135
|
+
100% $baseline;
|
|
136
|
+
background-position: 10px 0px; // Use to offset and center your grid
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// Example call
|
|
140
|
+
.baseline-grid {
|
|
141
|
+
}
|
package/scss/classes/_index.scss
CHANGED
|
@@ -3,25 +3,23 @@
|
|
|
3
3
|
// ============================================================================
|
|
4
4
|
|
|
5
5
|
////
|
|
6
|
-
///
|
|
6
|
+
///
|
|
7
7
|
/// Class Module
|
|
8
8
|
/// ===========================================================================
|
|
9
|
-
///
|
|
9
|
+
///
|
|
10
10
|
/// @group Classes
|
|
11
11
|
/// @author Scape Agency
|
|
12
12
|
/// @link https://unit.gl
|
|
13
13
|
/// @since 0.1.0 initial release
|
|
14
14
|
/// @todo None
|
|
15
15
|
/// @access public
|
|
16
|
-
///
|
|
16
|
+
///
|
|
17
17
|
////
|
|
18
18
|
|
|
19
|
-
|
|
20
19
|
// ============================================================================
|
|
21
20
|
// Use
|
|
22
21
|
// ============================================================================
|
|
23
22
|
|
|
24
|
-
|
|
25
23
|
// ============================================================================
|
|
26
24
|
// Forward
|
|
27
25
|
// ============================================================================
|
package/scss/classes/_ratio.scss
CHANGED
|
@@ -3,20 +3,19 @@
|
|
|
3
3
|
// ============================================================================
|
|
4
4
|
|
|
5
5
|
////
|
|
6
|
-
///
|
|
6
|
+
///
|
|
7
7
|
/// Ratio Class Module
|
|
8
8
|
/// ===========================================================================
|
|
9
|
-
///
|
|
9
|
+
///
|
|
10
10
|
/// @group Ratio
|
|
11
11
|
/// @author Scape Agency
|
|
12
12
|
/// @link https://unit.gl
|
|
13
13
|
/// @since 0.1.0 initial release
|
|
14
14
|
/// @todo None
|
|
15
15
|
/// @access public
|
|
16
|
-
///
|
|
16
|
+
///
|
|
17
17
|
////
|
|
18
18
|
|
|
19
|
-
|
|
20
19
|
// ============================================================================
|
|
21
20
|
// Use
|
|
22
21
|
// ============================================================================
|
|
@@ -24,7 +23,6 @@
|
|
|
24
23
|
@use "../variables" as *;
|
|
25
24
|
@use "../mixins" as *;
|
|
26
25
|
|
|
27
|
-
|
|
28
26
|
// ============================================================================
|
|
29
27
|
// Classes
|
|
30
28
|
// ============================================================================
|
package/scss/dev/_banner.scss
CHANGED
|
@@ -3,30 +3,27 @@
|
|
|
3
3
|
// ============================================================================
|
|
4
4
|
|
|
5
5
|
////
|
|
6
|
-
///
|
|
6
|
+
///
|
|
7
7
|
/// Dev Functions Module
|
|
8
8
|
/// ===========================================================================
|
|
9
|
-
///
|
|
9
|
+
///
|
|
10
10
|
/// @group Dev
|
|
11
11
|
/// @author Scape Agency
|
|
12
12
|
/// @link https://unit.gl
|
|
13
13
|
/// @since 0.1.0 initial release
|
|
14
14
|
/// @todo None
|
|
15
15
|
/// @access public
|
|
16
|
-
///
|
|
16
|
+
///
|
|
17
17
|
////
|
|
18
18
|
|
|
19
|
-
|
|
20
19
|
// ============================================================================
|
|
21
20
|
// Use
|
|
22
21
|
// ============================================================================
|
|
23
22
|
|
|
24
|
-
|
|
25
23
|
// ============================================================================
|
|
26
24
|
// Variables
|
|
27
25
|
// ============================================================================
|
|
28
26
|
|
|
29
|
-
|
|
30
27
|
/**
|
|
31
28
|
* unit.gl
|
|
32
29
|
*
|
|
@@ -37,4 +34,4 @@
|
|
|
37
34
|
* @website https://www.unit.gl/
|
|
38
35
|
* @repository https://github.com/scape-agency/unit.gl/
|
|
39
36
|
* @license Apache 2.0 License (https://github.com/scape-agency/unit.gl/blob/main/LICENSE)
|
|
40
|
-
*/
|
|
37
|
+
*/
|
package/scss/dev/_index.scss
CHANGED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// ============================================================================
|
|
2
|
+
// Use
|
|
3
|
+
// ============================================================================
|
|
4
|
+
|
|
5
|
+
// ============================================================================
|
|
6
|
+
// Forward
|
|
7
|
+
// ============================================================================
|