unit.gl 0.1.3 → 0.1.9
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/css/unit.gl.css +253 -122
- package/css/unit.gl.min.css +1 -1
- package/js/grids.js +59 -0
- package/js/grids.js.map +1 -0
- package/js/unit.gl.js +10 -0
- package/js/unit.gl.js.map +1 -0
- package/package.json +1 -1
- package/scss/_reset.scss +15 -1
- package/scss/classes/_guide.scss +56 -54
- package/scss/classes/_index.scss +1 -5
- package/scss/classes/_ratio.scss +56 -6
- package/scss/dev/_banner.scss +0 -4
- package/scss/functions/_color.scss +1 -5
- package/scss/functions/_index.scss +0 -4
- package/scss/functions/_layer.scss +3 -6
- package/scss/functions/_ratio.scss +2 -5
- package/scss/functions/_scale.scss +8 -14
- package/scss/functions/_sequence.scss +0 -5
- package/scss/functions/_view.scss +0 -4
- package/scss/functions/math/_arithmetic.scss +12 -10
- package/scss/functions/math/_index.scss +0 -4
- package/scss/functions/unit/_index.scss +0 -4
- package/scss/functions/unit/_unit_conversion.scss +6 -30
- package/scss/functions/unit/_unit_functions.scss +2 -16
- package/scss/index.scss +12 -1
- package/scss/maps/_color.scss +1 -5
- package/scss/{variables → maps}/_device.scss +78 -73
- package/scss/maps/_index.scss +36 -5
- package/scss/{variables/_ratio.scss → maps/_interval.scss} +1 -6
- package/scss/{variables → maps}/_layer.scss +24 -20
- package/scss/{variables → maps}/_paper.scss +613 -414
- package/scss/maps/_ratio.scss +76 -0
- package/scss/maps/_scale.scss +82 -0
- package/scss/mixins/_device.scss +11 -8
- package/scss/mixins/_display.scss +35 -72
- package/scss/mixins/_guide.scss +151 -43
- package/scss/mixins/_helper.scss +2 -6
- package/scss/mixins/_index.scss +0 -4
- package/scss/mixins/_paper.scss +3 -7
- package/scss/mixins/_ratio.scss +79 -238
- package/scss/mixins/_unit.scss +1 -10
- package/scss/mixins/_view.scss +1 -5
- package/scss/tags/_index.scss +0 -4
- package/scss/tags/_unit.scss +0 -4
- package/scss/test.scss +0 -0
- package/scss/variables/_color.scss +7 -7
- package/scss/variables/_guide.scss +0 -0
- package/scss/variables/_index.scss +6 -40
- package/scss/variables/_scale.scss +4 -89
- package/scss/variables/_unit.scss +2 -5
- package/scss/variables/_view.scss +2 -7
- package/ts/grids.ts +92 -0
- package/ts/index.ts +19 -1
- package/scss/classes/_guides.scss +0 -141
- package/ts/AspectRatio.ts +0 -50
- package/ts/Border.ts +0 -60
- package/ts/BoxModel.ts +0 -68
- package/ts/FlexContainer.ts +0 -75
- package/ts/Grid.ts +0 -46
- package/ts/GridContainer.ts +0 -59
- package/ts/Layout.ts +0 -64
- package/ts/Position.ts +0 -53
- package/ts/Rectangle.ts +0 -51
- package/ts/ResponsiveImage.ts +0 -47
- package/ts/ResponsiveScale.ts +0 -44
- package/ts/Size.ts +0 -54
- package/ts/Spacing.ts +0 -106
- package/ts/Transform.ts +0 -71
- package/ts/Typography.ts +0 -75
- package/ts/Unit.ts +0 -81
- package/ts/Viewport.ts +0 -52
package/scss/mixins/_ratio.scss
CHANGED
|
@@ -1,19 +1,24 @@
|
|
|
1
|
-
// ============================================================================
|
|
2
|
-
// Poster
|
|
3
|
-
// ============================================================================
|
|
4
|
-
|
|
5
1
|
////
|
|
6
2
|
///
|
|
7
3
|
/// Ratio Mixins Module
|
|
8
4
|
/// ===========================================================================
|
|
9
5
|
///
|
|
10
|
-
///
|
|
11
|
-
///
|
|
12
|
-
///
|
|
6
|
+
/// Provides mixins and utility classes for maintaining consistent aspect ratios
|
|
7
|
+
/// across devices. Includes native CSS `aspect-ratio` support with a fallback
|
|
8
|
+
/// using `padding-top` for broader browser compatibility.
|
|
9
|
+
///
|
|
10
|
+
/// Built from a shared `$ratio-map`, this module auto-generates both semantic
|
|
11
|
+
/// mixins (e.g. `aspect_ratio_16x9`) and utility classes (e.g. `.ratio_16x9`).
|
|
12
|
+
///
|
|
13
|
+
/// @file _ratio.scss
|
|
14
|
+
/// @title Ratio Mixins Module
|
|
15
|
+
/// @version 0.1.0
|
|
16
|
+
/// @description Provides utility mixins for maintaining consistent aspect ratios
|
|
17
|
+
/// across devices. Supports modern `aspect-ratio` CSS as well as
|
|
18
|
+
/// padding-based fallbacks for broader browser compatibility.
|
|
13
19
|
///
|
|
14
|
-
///
|
|
15
|
-
///
|
|
16
|
-
/// support.
|
|
20
|
+
/// Includes predefined common ratios (e.g., 1:1, 16:9) as mixins and
|
|
21
|
+
/// utility classes, enabling both declarative and semantic usage.
|
|
17
22
|
///
|
|
18
23
|
/// @group Ratio
|
|
19
24
|
/// @author Scape Agency
|
|
@@ -28,6 +33,8 @@
|
|
|
28
33
|
// Use
|
|
29
34
|
// ============================================================================
|
|
30
35
|
|
|
36
|
+
@use "sass:math";
|
|
37
|
+
|
|
31
38
|
@use "../functions" as *;
|
|
32
39
|
@use "../variables" as *;
|
|
33
40
|
@use "../maps" as *;
|
|
@@ -36,249 +43,83 @@
|
|
|
36
43
|
// Mixins
|
|
37
44
|
// ============================================================================
|
|
38
45
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
// }
|
|
55
|
-
// }
|
|
56
|
-
|
|
57
|
-
// .ratio-box {
|
|
58
|
-
// @include aspect-ratio(16, 9);
|
|
59
|
-
// }
|
|
60
|
-
|
|
61
|
-
@mixin ratio($val01, $val02) {
|
|
62
|
-
aspect-ratio: calc($val01 / $val02);
|
|
63
|
-
width: 100%;
|
|
46
|
+
///
|
|
47
|
+
/// @mixin aspect_ratio
|
|
48
|
+
/// Creates a responsive container that maintains a specific aspect ratio.
|
|
49
|
+
/// Uses the native `aspect-ratio` property where supported,
|
|
50
|
+
/// with a `padding-top` fallback for broader browser compatibility.
|
|
51
|
+
///
|
|
52
|
+
/// @param {Number} $width - The horizontal component of the aspect ratio.
|
|
53
|
+
/// @param {Number} $height - The vertical component of the aspect ratio.
|
|
54
|
+
///
|
|
55
|
+
/// @example scss - 16:9 container
|
|
56
|
+
/// .video-wrapper {
|
|
57
|
+
/// @include aspect_ratio(16, 9);
|
|
58
|
+
/// }
|
|
59
|
+
///
|
|
60
|
+
@mixin aspect_ratio($width, $height) {
|
|
64
61
|
position: relative;
|
|
65
|
-
overflow: hidden;
|
|
66
|
-
display: inline-block;
|
|
67
|
-
// vertical-align: top;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
@mixin ratio_1x1 {
|
|
71
|
-
@include ratio(1, 1);
|
|
72
|
-
}
|
|
73
|
-
@mixin ratio_1x2 {
|
|
74
|
-
@include ratio(1, 2);
|
|
75
|
-
}
|
|
76
|
-
@mixin ratio_2x1 {
|
|
77
|
-
@include ratio(2, 1);
|
|
78
|
-
}
|
|
79
|
-
@mixin ratio_1x3 {
|
|
80
|
-
@include ratio(1, 3);
|
|
81
|
-
}
|
|
82
|
-
@mixin ratio_3x1 {
|
|
83
|
-
@include ratio(3, 1);
|
|
84
|
-
}
|
|
85
|
-
@mixin ratio_1x4 {
|
|
86
|
-
@include ratio(1, 4);
|
|
87
|
-
}
|
|
88
|
-
@mixin ratio_4x1 {
|
|
89
|
-
@include ratio(4, 1);
|
|
90
|
-
}
|
|
91
|
-
@mixin ratio_3x2 {
|
|
92
|
-
@include ratio(3, 2);
|
|
93
|
-
}
|
|
94
|
-
@mixin ratio_2x3 {
|
|
95
|
-
@include ratio(2, 3);
|
|
96
|
-
}
|
|
97
|
-
@mixin ratio_4x3 {
|
|
98
|
-
@include ratio(4, 3);
|
|
99
|
-
}
|
|
100
|
-
@mixin ratio_3x4 {
|
|
101
|
-
@include ratio(3, 4);
|
|
102
|
-
}
|
|
103
|
-
@mixin ratio_16x9 {
|
|
104
|
-
@include ratio(16, 9);
|
|
105
|
-
}
|
|
106
|
-
@mixin ratio_16x10 {
|
|
107
|
-
@include ratio(16, 10);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.ratio_1x1 {
|
|
111
|
-
@include ratio_1x1;
|
|
112
|
-
}
|
|
113
|
-
.ratio_1x2 {
|
|
114
|
-
@include ratio_1x2;
|
|
115
|
-
}
|
|
116
|
-
.ratio_2x1 {
|
|
117
|
-
@include ratio_2x1;
|
|
118
|
-
}
|
|
119
|
-
.ratio_1x3 {
|
|
120
|
-
@include ratio_1x3;
|
|
121
|
-
}
|
|
122
|
-
.ratio_3x1 {
|
|
123
|
-
@include ratio_3x1;
|
|
124
|
-
}
|
|
125
|
-
.ratio_1x4 {
|
|
126
|
-
@include ratio_1x4;
|
|
127
|
-
}
|
|
128
|
-
.ratio_4x1 {
|
|
129
|
-
@include ratio_4x1;
|
|
130
|
-
}
|
|
131
|
-
.ratio_3x2 {
|
|
132
|
-
@include ratio_3x2;
|
|
133
|
-
}
|
|
134
|
-
.ratio_2x3 {
|
|
135
|
-
@include ratio_2x3;
|
|
136
|
-
}
|
|
137
|
-
.ratio_4x3 {
|
|
138
|
-
@include ratio_4x3;
|
|
139
|
-
}
|
|
140
|
-
.ratio_3x4 {
|
|
141
|
-
@include ratio_3x4;
|
|
142
|
-
}
|
|
143
|
-
.ratio_16x9 {
|
|
144
|
-
@include ratio_16x9;
|
|
145
|
-
}
|
|
146
|
-
.ratio_16x10 {
|
|
147
|
-
@include ratio_16x10;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
@mixin ratio_p($val01) {
|
|
151
|
-
padding-bottom: $val01;
|
|
152
62
|
width: 100%;
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
63
|
+
aspect-ratio: math.div($width, $height); // Native CSS support
|
|
64
|
+
|
|
65
|
+
// Fallback for legacy browsers
|
|
66
|
+
&::before {
|
|
67
|
+
content: "";
|
|
68
|
+
display: block;
|
|
69
|
+
padding-top: calc((#{$height} / #{$width}) * 100%);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
> * {
|
|
73
|
+
position: absolute;
|
|
74
|
+
top: 0;
|
|
75
|
+
right: 0;
|
|
76
|
+
bottom: 0;
|
|
77
|
+
left: 0;
|
|
78
|
+
width: 100%;
|
|
79
|
+
height: 100%;
|
|
80
|
+
}
|
|
157
81
|
}
|
|
158
82
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
@mixin ratio_p_1x2 {
|
|
163
|
-
@include ratio_p(200%);
|
|
164
|
-
}
|
|
165
|
-
@mixin ratio_p_2x1 {
|
|
166
|
-
@include ratio_p(50%);
|
|
167
|
-
}
|
|
168
|
-
@mixin ratio_p_1x3 {
|
|
169
|
-
@include ratio_p(300%);
|
|
170
|
-
}
|
|
171
|
-
@mixin ratio_p_3x1 {
|
|
172
|
-
@include ratio_p(33.33%);
|
|
173
|
-
}
|
|
174
|
-
@mixin ratio_p_1x4 {
|
|
175
|
-
@include ratio_p(400%);
|
|
176
|
-
}
|
|
177
|
-
@mixin ratio_p_4x1 {
|
|
178
|
-
@include ratio_p(25%);
|
|
179
|
-
}
|
|
180
|
-
@mixin ratio_p_2x3 {
|
|
181
|
-
@include ratio_p(150%);
|
|
182
|
-
}
|
|
183
|
-
@mixin ratio_p_3x2 {
|
|
184
|
-
@include ratio_p(66.67%);
|
|
185
|
-
}
|
|
186
|
-
@mixin ratio_p_3x4 {
|
|
187
|
-
@include ratio_p(133.33%);
|
|
188
|
-
}
|
|
189
|
-
@mixin ratio_p_4x3 {
|
|
190
|
-
@include ratio_p(75%);
|
|
191
|
-
}
|
|
192
|
-
@mixin ratio_p_16x9 {
|
|
193
|
-
@include ratio_p(56.25%);
|
|
194
|
-
}
|
|
195
|
-
@mixin ratio_p_16x10 {
|
|
196
|
-
@include ratio_p(62.5%);
|
|
197
|
-
}
|
|
83
|
+
// ============================================================================
|
|
84
|
+
// Semantic Mixins
|
|
85
|
+
// ============================================================================
|
|
198
86
|
|
|
199
|
-
|
|
200
|
-
@include
|
|
87
|
+
@mixin aspect_ratio_1x1 {
|
|
88
|
+
@include aspect_ratio(1, 1);
|
|
201
89
|
}
|
|
202
|
-
|
|
203
|
-
@include
|
|
90
|
+
@mixin aspect_ratio_1x2 {
|
|
91
|
+
@include aspect_ratio(1, 2);
|
|
204
92
|
}
|
|
205
|
-
|
|
206
|
-
@include
|
|
93
|
+
@mixin aspect_ratio_2x1 {
|
|
94
|
+
@include aspect_ratio(2, 1);
|
|
207
95
|
}
|
|
208
|
-
|
|
209
|
-
@include
|
|
96
|
+
@mixin aspect_ratio_1x3 {
|
|
97
|
+
@include aspect_ratio(1, 3);
|
|
210
98
|
}
|
|
211
|
-
|
|
212
|
-
@include
|
|
99
|
+
@mixin aspect_ratio_3x1 {
|
|
100
|
+
@include aspect_ratio(3, 1);
|
|
213
101
|
}
|
|
214
|
-
|
|
215
|
-
@include
|
|
102
|
+
@mixin aspect_ratio_1x4 {
|
|
103
|
+
@include aspect_ratio(1, 4);
|
|
216
104
|
}
|
|
217
|
-
|
|
218
|
-
@include
|
|
105
|
+
@mixin aspect_ratio_4x1 {
|
|
106
|
+
@include aspect_ratio(4, 1);
|
|
219
107
|
}
|
|
220
|
-
|
|
221
|
-
@include
|
|
108
|
+
@mixin aspect_ratio_3x2 {
|
|
109
|
+
@include aspect_ratio(3, 2);
|
|
222
110
|
}
|
|
223
|
-
|
|
224
|
-
@include
|
|
111
|
+
@mixin aspect_ratio_2x3 {
|
|
112
|
+
@include aspect_ratio(2, 3);
|
|
225
113
|
}
|
|
226
|
-
|
|
227
|
-
@include
|
|
114
|
+
@mixin aspect_ratio_4x3 {
|
|
115
|
+
@include aspect_ratio(4, 3);
|
|
228
116
|
}
|
|
229
|
-
|
|
230
|
-
@include
|
|
117
|
+
@mixin aspect_ratio_3x4 {
|
|
118
|
+
@include aspect_ratio(3, 4);
|
|
231
119
|
}
|
|
232
|
-
|
|
233
|
-
@include
|
|
120
|
+
@mixin aspect_ratio_16x9 {
|
|
121
|
+
@include aspect_ratio(16, 9);
|
|
234
122
|
}
|
|
235
|
-
|
|
236
|
-
@include
|
|
123
|
+
@mixin aspect_ratio_16x10 {
|
|
124
|
+
@include aspect_ratio(16, 10);
|
|
237
125
|
}
|
|
238
|
-
|
|
239
|
-
// https://github.com/twbs/bootstrap/blob/main/scss/helpers/_ratio.scss
|
|
240
|
-
// Credit: Nicolas Gallagher and SUIT CSS.
|
|
241
|
-
|
|
242
|
-
// .ratio {
|
|
243
|
-
// position: relative;
|
|
244
|
-
// width: 100%;
|
|
245
|
-
|
|
246
|
-
// &::before {
|
|
247
|
-
// display: block;
|
|
248
|
-
// padding-top: var(--#{$prefix}aspect-ratio);
|
|
249
|
-
// content: "";
|
|
250
|
-
// }
|
|
251
|
-
|
|
252
|
-
// > * {
|
|
253
|
-
// position: absolute;
|
|
254
|
-
// top: 0;
|
|
255
|
-
// left: 0;
|
|
256
|
-
// width: 100%;
|
|
257
|
-
// height: 100%;
|
|
258
|
-
// }
|
|
259
|
-
// }
|
|
260
|
-
|
|
261
|
-
// @each $key, $ratio in $aspect-ratios {
|
|
262
|
-
// .ratio-#{$key} {
|
|
263
|
-
// --#{$prefix}aspect-ratio: #{$ratio};
|
|
264
|
-
// }
|
|
265
|
-
// }
|
|
266
|
-
|
|
267
|
-
// @mixin aspect-ratio($width, $height) {
|
|
268
|
-
// position: relative;
|
|
269
|
-
|
|
270
|
-
// &::before {
|
|
271
|
-
// display: block;
|
|
272
|
-
// content: "";
|
|
273
|
-
// width: 100%;
|
|
274
|
-
// padding-top: calc((#{$height} / #{$width}) * 100%);
|
|
275
|
-
// }
|
|
276
|
-
|
|
277
|
-
// > * {
|
|
278
|
-
// position: absolute;
|
|
279
|
-
// top: 0;
|
|
280
|
-
// right: 0;
|
|
281
|
-
// bottom: 0;
|
|
282
|
-
// left: 0;
|
|
283
|
-
// }
|
|
284
|
-
// }
|
package/scss/mixins/_unit.scss
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
// ============================================================================
|
|
2
|
-
// Poster
|
|
3
|
-
// ============================================================================
|
|
4
|
-
|
|
5
1
|
////
|
|
6
2
|
///
|
|
7
3
|
/// Device Mixins Module
|
|
@@ -61,12 +57,7 @@
|
|
|
61
57
|
/// @include fluid_type(320px, 1440px, 1rem, 2rem);
|
|
62
58
|
/// }
|
|
63
59
|
///
|
|
64
|
-
@mixin fluid_type(
|
|
65
|
-
$min_vw,
|
|
66
|
-
$max_vw,
|
|
67
|
-
$min_font_size,
|
|
68
|
-
$max_font_size,
|
|
69
|
-
) {
|
|
60
|
+
@mixin fluid_type($min_vw, $max_vw, $min_font_size, $max_font_size) {
|
|
70
61
|
// $u1: unit($min_vw);
|
|
71
62
|
// $u2: unit($max_vw);
|
|
72
63
|
// $u3: unit($min_font_size);
|
package/scss/mixins/_view.scss
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
// ============================================================================
|
|
2
|
-
// Poster
|
|
3
|
-
// ============================================================================
|
|
4
|
-
|
|
5
1
|
////
|
|
6
2
|
///
|
|
7
3
|
/// View Mixins Module
|
|
@@ -48,7 +44,7 @@
|
|
|
48
44
|
///
|
|
49
45
|
@mixin breakpoint($size) {
|
|
50
46
|
@if map-has-key($breakpoints, $size) {
|
|
51
|
-
@media (min-width: map
|
|
47
|
+
@media (min-width: map.get($breakpoints, $size)) {
|
|
52
48
|
@content;
|
|
53
49
|
}
|
|
54
50
|
} @else {
|
package/scss/tags/_index.scss
CHANGED
package/scss/tags/_unit.scss
CHANGED
package/scss/test.scss
ADDED
|
File without changes
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
// ============================================================================
|
|
2
|
-
// Poster
|
|
3
|
-
// ============================================================================
|
|
4
|
-
|
|
5
1
|
////
|
|
6
2
|
///
|
|
7
3
|
/// Color Variables Module
|
|
@@ -20,7 +16,6 @@
|
|
|
20
16
|
///
|
|
21
17
|
////
|
|
22
18
|
|
|
23
|
-
|
|
24
19
|
// ============================================================================
|
|
25
20
|
// Use
|
|
26
21
|
// ============================================================================
|
|
@@ -29,9 +24,14 @@
|
|
|
29
24
|
// Variables
|
|
30
25
|
// ============================================================================
|
|
31
26
|
|
|
32
|
-
$
|
|
33
|
-
$
|
|
27
|
+
$guide_baseline_primary: rgb(0, 200, 255);
|
|
28
|
+
$guide_baseline_secondary: rgb(125, 181, 203);
|
|
29
|
+
|
|
30
|
+
$guide_color: rgb(0, 200, 255);
|
|
31
|
+
|
|
32
|
+
$guide_graph_primary: rgba(111, 124, 126, 0.483);
|
|
34
33
|
|
|
34
|
+
$guide_bleed_primary: rgba(178, 51, 170, 0.5);
|
|
35
35
|
///
|
|
36
36
|
/// Primary Guide Color
|
|
37
37
|
/// ---------------------------------------------------------------------------
|
|
File without changes
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
// ============================================================================
|
|
2
|
-
// Poster
|
|
3
|
-
// ============================================================================
|
|
4
|
-
|
|
5
1
|
////
|
|
6
2
|
///
|
|
7
3
|
/// Variables Module
|
|
@@ -31,68 +27,38 @@
|
|
|
31
27
|
///
|
|
32
28
|
////
|
|
33
29
|
|
|
34
|
-
|
|
35
30
|
// ============================================================================
|
|
36
31
|
// Use
|
|
37
32
|
// ============================================================================
|
|
38
33
|
|
|
39
|
-
|
|
40
34
|
// ============================================================================
|
|
41
35
|
// Forward
|
|
42
36
|
// ============================================================================
|
|
43
37
|
|
|
44
|
-
|
|
45
|
-
///
|
|
46
|
-
/// Forwards variables related to layout layers and z-indexing, ensuring
|
|
47
|
-
/// consistent layering and stacking order throughout the project.
|
|
48
|
-
///
|
|
49
|
-
@forward "layer"; // Layout layers and z-index variables
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
///
|
|
53
|
-
/// Forwards variables defining paper sizes etc.
|
|
54
|
-
///
|
|
55
|
-
@forward "paper";
|
|
56
|
-
|
|
57
|
-
|
|
58
38
|
///
|
|
59
39
|
/// Forwards variables managing scaling factors for typography and responsive
|
|
60
40
|
/// elements, ensuring that elements scale proportionally across different
|
|
61
41
|
/// viewports.
|
|
62
42
|
///
|
|
63
|
-
@forward "scale";
|
|
64
|
-
|
|
43
|
+
@forward "scale"; // Typography scaling and responsive element sizing
|
|
65
44
|
|
|
66
45
|
///
|
|
67
46
|
/// Forwards viewport-specific variables, such as breakpoints, to facilitate
|
|
68
47
|
/// responsive design practices.
|
|
69
48
|
///
|
|
70
|
-
@forward "view";
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
///
|
|
74
|
-
/// Forwards device-specific configurations that aid in creating responsive
|
|
75
|
-
/// designs tailored to various devices.
|
|
76
|
-
///
|
|
77
|
-
@forward "device"; // Device-specific responsive design variables
|
|
78
|
-
|
|
49
|
+
@forward "view"; // Viewport-specific variables and breakpoints
|
|
79
50
|
|
|
80
51
|
///
|
|
81
52
|
/// Forwards centralized color definitions, providing a consistent color scheme
|
|
82
53
|
/// across the project.
|
|
83
54
|
///
|
|
84
|
-
@forward "color";
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
///
|
|
88
|
-
/// Forwards aspect ratio configurations that ensure responsive elements
|
|
89
|
-
/// maintain their intended proportions across different devices and viewports.
|
|
90
|
-
///
|
|
91
|
-
@forward "ratio"; // Aspect ratio configurations for responsive elements
|
|
55
|
+
@forward "color"; // Centralized color definitions for the project
|
|
92
56
|
|
|
93
57
|
///
|
|
94
58
|
/// Forwards variables related to measurement units, spacing, and size
|
|
95
59
|
/// definitions. Useful for maintaining consistent sizing across different
|
|
96
60
|
/// components.
|
|
97
61
|
///
|
|
98
|
-
@forward "unit";
|
|
62
|
+
@forward "unit"; // Measurement units and spacing
|
|
63
|
+
|
|
64
|
+
@forward "guide";
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
// ============================================================================
|
|
2
|
-
// Poster
|
|
3
|
-
// ============================================================================
|
|
4
|
-
|
|
5
1
|
////
|
|
6
2
|
///
|
|
7
3
|
/// Scale Variables Module
|
|
@@ -22,7 +18,6 @@
|
|
|
22
18
|
///
|
|
23
19
|
////
|
|
24
20
|
|
|
25
|
-
|
|
26
21
|
// ============================================================================
|
|
27
22
|
// Use
|
|
28
23
|
// ============================================================================
|
|
@@ -125,7 +120,8 @@ $typographic_scale: (
|
|
|
125
120
|
// +8 units
|
|
126
121
|
16: q(64),
|
|
127
122
|
// +8 units
|
|
128
|
-
17: q(72),
|
|
123
|
+
17: q(72),
|
|
124
|
+
// +8 units
|
|
129
125
|
) !default;
|
|
130
126
|
|
|
131
127
|
///
|
|
@@ -168,7 +164,7 @@ $basepoint: (
|
|
|
168
164
|
9: basepoint(9),
|
|
169
165
|
10: basepoint(10),
|
|
170
166
|
11: basepoint(11),
|
|
171
|
-
12: basepoint(12)
|
|
167
|
+
12: basepoint(12)
|
|
172
168
|
) !default;
|
|
173
169
|
|
|
174
170
|
///
|
|
@@ -213,86 +209,5 @@ $baseline: (
|
|
|
213
209
|
9: baseline(9),
|
|
214
210
|
10: baseline(10),
|
|
215
211
|
11: baseline(11),
|
|
216
|
-
12: baseline(12)
|
|
217
|
-
) !default;
|
|
218
|
-
|
|
219
|
-
///
|
|
220
|
-
/// Musical Scales Map
|
|
221
|
-
/// ---------------------------------------------------------------------------
|
|
222
|
-
///
|
|
223
|
-
/// A map representing various musical scales by their degree.
|
|
224
|
-
/// These scales can be used to inform design decisions, such as rhythm-based
|
|
225
|
-
/// spacing or modular scale ratios in typography.
|
|
226
|
-
///
|
|
227
|
-
/// @name scale_musical
|
|
228
|
-
/// @type Map
|
|
229
|
-
///
|
|
230
|
-
$scale_musical: (
|
|
231
|
-
"monotonic": 1,
|
|
232
|
-
// Single tone scale
|
|
233
|
-
"ditonic": 2,
|
|
234
|
-
// Two-tone scale
|
|
235
|
-
"tritonic": 3,
|
|
236
|
-
// Three-tone scale
|
|
237
|
-
"tetratonic": 4,
|
|
238
|
-
// Four-tone scale
|
|
239
|
-
"pentatonic": 5,
|
|
240
|
-
// Five-tone scale, commonly used in music
|
|
241
|
-
"hexatonic": 6,
|
|
242
|
-
// Six-tone scale
|
|
243
|
-
"peptatonic": 7,
|
|
244
|
-
// Seven-tone scale
|
|
245
|
-
"octatonic": 8,
|
|
246
|
-
// Eight-tone scale
|
|
247
|
-
"nonatonic": 9,
|
|
248
|
-
// Nine-tone scale
|
|
249
|
-
"dodecatonic": 12, // Twelve-tone scale, covers all semitones in an octave
|
|
250
|
-
) !default;
|
|
251
|
-
|
|
252
|
-
/// Classic Typographic Scale
|
|
253
|
-
/// ---------------------------------------------------------------------------
|
|
254
|
-
///
|
|
255
|
-
/// A classic typographic scale that has historical significance,
|
|
256
|
-
/// often used in design software and by typographers since the Renaissance.
|
|
257
|
-
/// This scale ensures harmonious and aesthetically pleasing text sizing.
|
|
258
|
-
///
|
|
259
|
-
/// @name typographic_scale_classic
|
|
260
|
-
/// @type Map
|
|
261
|
-
///
|
|
262
|
-
$typographic_scale_classic: (
|
|
263
|
-
1: q(6),
|
|
264
|
-
// 6q
|
|
265
|
-
2: q(7),
|
|
266
|
-
// 7q (+1)
|
|
267
|
-
3: q(8),
|
|
268
|
-
// 8q (+1)
|
|
269
|
-
4: q(9),
|
|
270
|
-
// 9q (+1)
|
|
271
|
-
5: q(10),
|
|
272
|
-
// 10q (+1)
|
|
273
|
-
6: q(11),
|
|
274
|
-
// 11q (+1)
|
|
275
|
-
7: q(12),
|
|
276
|
-
// 12q (+1)
|
|
277
|
-
8: q(14),
|
|
278
|
-
// 14q (+2)
|
|
279
|
-
9: q(16),
|
|
280
|
-
// 16q (+2)
|
|
281
|
-
10: q(18),
|
|
282
|
-
// 18q (+2)
|
|
283
|
-
11: q(21),
|
|
284
|
-
// 21q (+3)
|
|
285
|
-
12: q(24),
|
|
286
|
-
// 24q (+3)
|
|
287
|
-
13: q(36),
|
|
288
|
-
// 36q (+12)
|
|
289
|
-
14: q(48),
|
|
290
|
-
// 48q (+12)
|
|
291
|
-
15: q(60),
|
|
292
|
-
// 60q (+12)
|
|
293
|
-
16: q(72),
|
|
294
|
-
// 72q (+12)
|
|
295
|
-
17: q(84),
|
|
296
|
-
// 84q (+12)
|
|
297
|
-
18: q(96), // 96q (+12)
|
|
212
|
+
12: baseline(12)
|
|
298
213
|
) !default;
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
// ============================================================================
|
|
2
|
-
// Poster
|
|
3
|
-
// ============================================================================
|
|
4
|
-
|
|
5
1
|
////
|
|
6
2
|
///
|
|
7
3
|
/// Unit Variables Module
|
|
@@ -25,7 +21,6 @@
|
|
|
25
21
|
///
|
|
26
22
|
////
|
|
27
23
|
|
|
28
|
-
|
|
29
24
|
// ============================================================================
|
|
30
25
|
// Use
|
|
31
26
|
// ============================================================================
|
|
@@ -60,6 +55,7 @@ $q_min: 0.75px !default;
|
|
|
60
55
|
///
|
|
61
56
|
/// @type Length
|
|
62
57
|
/// @name $q_max
|
|
58
|
+
///
|
|
63
59
|
$q_max: 1.5px !default;
|
|
64
60
|
|
|
65
61
|
///
|
|
@@ -77,6 +73,7 @@ $font_min: calc((1rem / $q) * $q_min) !default;
|
|
|
77
73
|
///
|
|
78
74
|
/// @type Length
|
|
79
75
|
/// @name $font_max
|
|
76
|
+
///
|
|
80
77
|
$font_max: calc((1rem / $q) * $q_max) !default;
|
|
81
78
|
|
|
82
79
|
///
|