unit.gl 0.0.40 → 0.1.2
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 +2 -3
- package/css/unit.gl.css +54 -42
- package/css/unit.gl.min.css +1 -1
- package/package.json +7 -7
- 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/scss/mixins/_ratio.scss
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
// ============================================================================
|
|
4
4
|
|
|
5
5
|
////
|
|
6
|
-
///
|
|
6
|
+
///
|
|
7
7
|
/// Ratio Mixins Module
|
|
8
8
|
/// ===========================================================================
|
|
9
|
-
///
|
|
9
|
+
///
|
|
10
10
|
/// This module provides mixins for creating aspect ratio containers.
|
|
11
11
|
/// These containers maintain a specific width-to-height ratio, ensuring
|
|
12
12
|
/// that elements scale proportionally across different screen sizes.
|
|
@@ -14,35 +14,34 @@
|
|
|
14
14
|
/// There are two approaches provided: one using the `aspect-ratio` CSS
|
|
15
15
|
/// property, and another using padding percentages for broader browser
|
|
16
16
|
/// support.
|
|
17
|
-
///
|
|
17
|
+
///
|
|
18
18
|
/// @group Ratio
|
|
19
19
|
/// @author Scape Agency
|
|
20
20
|
/// @link https://unit.gl
|
|
21
21
|
/// @since 0.1.0 initial release
|
|
22
22
|
/// @todo None
|
|
23
23
|
/// @access public
|
|
24
|
-
///
|
|
24
|
+
///
|
|
25
25
|
////
|
|
26
26
|
|
|
27
|
-
|
|
28
27
|
// ============================================================================
|
|
29
28
|
// Use
|
|
30
29
|
// ============================================================================
|
|
31
30
|
|
|
31
|
+
@use "../functions" as *;
|
|
32
32
|
@use "../variables" as *;
|
|
33
|
-
|
|
33
|
+
@use "../maps" as *;
|
|
34
34
|
|
|
35
35
|
// ============================================================================
|
|
36
36
|
// Mixins
|
|
37
37
|
// ============================================================================
|
|
38
38
|
|
|
39
|
-
|
|
40
39
|
// Aspect Ratio Box:
|
|
41
40
|
// Creates a container with a specific aspect ratio.
|
|
42
41
|
// @mixin aspect-ratio($width, $height) {
|
|
43
42
|
// position: relative;
|
|
44
43
|
// &:before {
|
|
45
|
-
// content:
|
|
44
|
+
// content: "";
|
|
46
45
|
// display: block;
|
|
47
46
|
// padding-top: calc(($height / $width) * 100%);
|
|
48
47
|
// }
|
|
@@ -59,8 +58,7 @@
|
|
|
59
58
|
// @include aspect-ratio(16, 9);
|
|
60
59
|
// }
|
|
61
60
|
|
|
62
|
-
|
|
63
|
-
@mixin ratio ($val01, $val02) {
|
|
61
|
+
@mixin ratio($val01, $val02) {
|
|
64
62
|
aspect-ratio: calc($val01 / $val02);
|
|
65
63
|
width: 100%;
|
|
66
64
|
position: relative;
|
|
@@ -69,37 +67,87 @@
|
|
|
69
67
|
// vertical-align: top;
|
|
70
68
|
}
|
|
71
69
|
|
|
72
|
-
@mixin ratio_1x1
|
|
73
|
-
@
|
|
74
|
-
|
|
75
|
-
@mixin
|
|
76
|
-
@
|
|
77
|
-
|
|
78
|
-
@mixin
|
|
79
|
-
@
|
|
80
|
-
|
|
81
|
-
@mixin
|
|
82
|
-
@
|
|
83
|
-
|
|
84
|
-
@mixin
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
@mixin
|
|
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) {
|
|
103
151
|
padding-bottom: $val01;
|
|
104
152
|
width: 100%;
|
|
105
153
|
position: relative;
|
|
@@ -108,39 +156,88 @@
|
|
|
108
156
|
// vertical-align: top;
|
|
109
157
|
}
|
|
110
158
|
|
|
111
|
-
@mixin ratio_p_1x1
|
|
112
|
-
@
|
|
113
|
-
|
|
114
|
-
@mixin
|
|
115
|
-
@
|
|
116
|
-
|
|
117
|
-
@mixin
|
|
118
|
-
@
|
|
119
|
-
|
|
120
|
-
@mixin
|
|
121
|
-
@
|
|
122
|
-
|
|
123
|
-
@mixin
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
159
|
+
@mixin ratio_p_1x1 {
|
|
160
|
+
@include ratio_p(100%);
|
|
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
|
+
}
|
|
198
|
+
|
|
199
|
+
.ratio_p_1x1 {
|
|
200
|
+
@include ratio_p_1x1;
|
|
201
|
+
}
|
|
202
|
+
.ratio_p_1x2 {
|
|
203
|
+
@include ratio_p_1x2;
|
|
204
|
+
}
|
|
205
|
+
.ratio_p_2x1 {
|
|
206
|
+
@include ratio_p_2x1;
|
|
207
|
+
}
|
|
208
|
+
.ratio_p_1x3 {
|
|
209
|
+
@include ratio_p_1x3;
|
|
210
|
+
}
|
|
211
|
+
.ratio_p_3x1 {
|
|
212
|
+
@include ratio_p_3x1;
|
|
213
|
+
}
|
|
214
|
+
.ratio_p_1x4 {
|
|
215
|
+
@include ratio_p_1x4;
|
|
216
|
+
}
|
|
217
|
+
.ratio_p_4x1 {
|
|
218
|
+
@include ratio_p_4x1;
|
|
219
|
+
}
|
|
220
|
+
.ratio_p_3x2 {
|
|
221
|
+
@include ratio_p_3x2;
|
|
222
|
+
}
|
|
223
|
+
.ratio_p_2x3 {
|
|
224
|
+
@include ratio_p_2x3;
|
|
225
|
+
}
|
|
226
|
+
.ratio_p_4x3 {
|
|
227
|
+
@include ratio_p_4x3;
|
|
228
|
+
}
|
|
229
|
+
.ratio_p_3x4 {
|
|
230
|
+
@include ratio_p_3x4;
|
|
231
|
+
}
|
|
232
|
+
.ratio_p_16x9 {
|
|
233
|
+
@include ratio_p_16x9;
|
|
234
|
+
}
|
|
235
|
+
.ratio_p_16x10 {
|
|
236
|
+
@include ratio_p_16x10;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
// https://github.com/twbs/bootstrap/blob/main/scss/helpers/_ratio.scss
|
|
240
|
+
// Credit: Nicolas Gallagher and SUIT CSS.
|
|
144
241
|
|
|
145
242
|
// .ratio {
|
|
146
243
|
// position: relative;
|
|
@@ -167,7 +264,6 @@
|
|
|
167
264
|
// }
|
|
168
265
|
// }
|
|
169
266
|
|
|
170
|
-
|
|
171
267
|
// @mixin aspect-ratio($width, $height) {
|
|
172
268
|
// position: relative;
|
|
173
269
|
|
|
@@ -185,4 +281,4 @@
|
|
|
185
281
|
// bottom: 0;
|
|
186
282
|
// left: 0;
|
|
187
283
|
// }
|
|
188
|
-
// }
|
|
284
|
+
// }
|
package/scss/mixins/_unit.scss
CHANGED
|
@@ -3,76 +3,79 @@
|
|
|
3
3
|
// ============================================================================
|
|
4
4
|
|
|
5
5
|
////
|
|
6
|
-
///
|
|
6
|
+
///
|
|
7
7
|
/// Device Mixins Module
|
|
8
8
|
/// ===========================================================================
|
|
9
|
-
///
|
|
9
|
+
///
|
|
10
10
|
/// @group Unit
|
|
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
|
-
@use "
|
|
25
|
-
@use "../functions" as *;
|
|
23
|
+
@use "sass:math";
|
|
26
24
|
|
|
25
|
+
@use "../functions" as *;
|
|
26
|
+
@use "../variables" as *;
|
|
27
|
+
@use "../maps" as *;
|
|
27
28
|
|
|
28
29
|
// ============================================================================
|
|
29
30
|
// Mixins
|
|
30
31
|
// ============================================================================
|
|
31
32
|
|
|
32
|
-
|
|
33
|
-
///
|
|
33
|
+
///
|
|
34
34
|
/// This mixin applies a CSS property with a value calculated in Kyū units.
|
|
35
|
-
///
|
|
35
|
+
///
|
|
36
36
|
/// @name q
|
|
37
37
|
/// @param {Number} $multiplier - The multiplier to apply to the base Kyū unit.
|
|
38
38
|
/// @param {String} $property - The CSS property to which the calculated value is applied.
|
|
39
|
-
///
|
|
39
|
+
///
|
|
40
40
|
/// @example scss - Usage
|
|
41
41
|
/// .element {
|
|
42
|
-
/// @include q(4,
|
|
42
|
+
/// @include q(4, "padding"); // Applies padding using 4 times the base Kyū unit
|
|
43
43
|
/// }
|
|
44
|
-
///
|
|
44
|
+
///
|
|
45
45
|
@mixin q($multiplier, $property) {
|
|
46
46
|
#{$property}: q($multiplier);
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
///
|
|
49
|
+
///
|
|
51
50
|
/// A mixin for fluid typography that scales font sizes between a specified
|
|
52
51
|
/// minimum and maximum viewport width, ensuring a smooth transition.
|
|
53
|
-
///
|
|
52
|
+
///
|
|
54
53
|
/// @name fluid_type
|
|
55
54
|
/// @param {Length} $min_vw - The minimum viewport width where the fluid scaling starts.
|
|
56
55
|
/// @param {Length} $max_vw - The maximum viewport width where the fluid scaling ends.
|
|
57
56
|
/// @param {Length} $min_font_size - The minimum font size for the smallest viewport.
|
|
58
57
|
/// @param {Length} $max_font_size - The maximum font size for the largest viewport.
|
|
59
|
-
///
|
|
58
|
+
///
|
|
60
59
|
/// @example scss - Usage
|
|
61
60
|
/// html {
|
|
62
61
|
/// @include fluid_type(320px, 1440px, 1rem, 2rem);
|
|
63
62
|
/// }
|
|
64
|
-
///
|
|
63
|
+
///
|
|
65
64
|
@mixin fluid_type(
|
|
66
65
|
$min_vw,
|
|
67
66
|
$max_vw,
|
|
68
67
|
$min_font_size,
|
|
69
|
-
$max_font_size
|
|
68
|
+
$max_font_size,
|
|
70
69
|
) {
|
|
70
|
+
// $u1: unit($min_vw);
|
|
71
|
+
// $u2: unit($max_vw);
|
|
72
|
+
// $u3: unit($min_font_size);
|
|
73
|
+
// $u4: unit($max_font_size);
|
|
71
74
|
|
|
72
|
-
$u1: unit($min_vw);
|
|
73
|
-
$u2: unit($max_vw);
|
|
74
|
-
$u3: unit($min_font_size);
|
|
75
|
-
$u4: unit($max_font_size);
|
|
75
|
+
$u1: math.unit($min_vw);
|
|
76
|
+
$u2: math.unit($max_vw);
|
|
77
|
+
$u3: math.unit($min_font_size);
|
|
78
|
+
$u4: math.unit($max_font_size);
|
|
76
79
|
|
|
77
80
|
@if $u1 == $u2 and $u1 == $u3 and $u1 == $u4 {
|
|
78
81
|
& {
|
|
@@ -80,7 +83,14 @@
|
|
|
80
83
|
|
|
81
84
|
@media screen and (min-width: $min_vw) {
|
|
82
85
|
font-size: calc(
|
|
83
|
-
#{$min_font_size} + #{unit_strip(
|
|
86
|
+
#{$min_font_size} + #{unit_strip(
|
|
87
|
+
$max_font_size - $min_font_size
|
|
88
|
+
)} *
|
|
89
|
+
(
|
|
90
|
+
(100vw - #{$min_vw}) / #{unit_strip(
|
|
91
|
+
$max_vw - $min_vw
|
|
92
|
+
)}
|
|
93
|
+
)
|
|
84
94
|
);
|
|
85
95
|
}
|
|
86
96
|
|
package/scss/mixins/_view.scss
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
// ============================================================================
|
|
4
4
|
|
|
5
5
|
////
|
|
6
|
-
///
|
|
6
|
+
///
|
|
7
7
|
/// View Mixins Module
|
|
8
8
|
/// ===========================================================================
|
|
9
|
-
///
|
|
9
|
+
///
|
|
10
10
|
/// This module provides a set of mixins for applying media queries based on
|
|
11
|
-
/// predefined breakpoints. These mixins allow for a clean, semantic way to
|
|
11
|
+
/// predefined breakpoints. These mixins allow for a clean, semantic way to
|
|
12
12
|
/// handle responsive design across different screen sizes.
|
|
13
13
|
///
|
|
14
14
|
/// @group View
|
|
@@ -16,37 +16,36 @@
|
|
|
16
16
|
/// @link https://unit.gl
|
|
17
17
|
/// @since 0.1.0 initial release
|
|
18
18
|
/// @todo None
|
|
19
|
-
/// @require "../variables" - for access to the $breakpoints map and related
|
|
19
|
+
/// @require "../variables" - for access to the $breakpoints map and related
|
|
20
|
+
/// variables.
|
|
20
21
|
/// @access public
|
|
21
|
-
///
|
|
22
|
+
///
|
|
22
23
|
////
|
|
23
24
|
|
|
24
|
-
|
|
25
25
|
// ============================================================================
|
|
26
26
|
// Use
|
|
27
27
|
// ============================================================================
|
|
28
28
|
|
|
29
29
|
@use "../variables" as *;
|
|
30
30
|
|
|
31
|
-
|
|
32
31
|
// ============================================================================
|
|
33
32
|
// Mixins
|
|
34
33
|
// ============================================================================
|
|
35
34
|
|
|
36
|
-
|
|
37
|
-
///
|
|
38
|
-
/// Applies styles for the specified breakpoint. If the breakpoint
|
|
35
|
+
///
|
|
36
|
+
/// Applies styles for the specified breakpoint. If the breakpoint
|
|
39
37
|
/// is not found, a warning is issued.
|
|
40
|
-
///
|
|
38
|
+
///
|
|
41
39
|
/// @name breakpoint
|
|
42
|
-
/// @param {String} $size - The name of the breakpoint as defined in the
|
|
40
|
+
/// @param {String} $size - The name of the breakpoint as defined in the
|
|
41
|
+
/// $breakpoints map.
|
|
43
42
|
/// @content
|
|
44
|
-
///
|
|
43
|
+
///
|
|
45
44
|
/// @example scss - Usage
|
|
46
45
|
/// @include breakpoint(md) {
|
|
47
46
|
/// // Styles for medium screens and up
|
|
48
47
|
/// }
|
|
49
|
-
///
|
|
48
|
+
///
|
|
50
49
|
@mixin breakpoint($size) {
|
|
51
50
|
@if map-has-key($breakpoints, $size) {
|
|
52
51
|
@media (min-width: map-get($breakpoints, $size)) {
|
|
@@ -57,102 +56,96 @@
|
|
|
57
56
|
}
|
|
58
57
|
}
|
|
59
58
|
|
|
60
|
-
|
|
61
|
-
///
|
|
59
|
+
///
|
|
62
60
|
/// Applies styles for extra-small devices and up (min-width: 320px).
|
|
63
|
-
///
|
|
61
|
+
///
|
|
64
62
|
/// @name media_xs
|
|
65
63
|
/// @example scss - Usage
|
|
66
64
|
/// @include media_xs {
|
|
67
65
|
/// // Styles for extra-small devices and up
|
|
68
66
|
/// }
|
|
69
|
-
///
|
|
67
|
+
///
|
|
70
68
|
@mixin media_xs {
|
|
71
|
-
@media (min-width: $media_xs) {
|
|
72
|
-
@content;
|
|
69
|
+
@media (min-width: $media_xs) {
|
|
70
|
+
@content;
|
|
73
71
|
}
|
|
74
72
|
}
|
|
75
73
|
|
|
76
|
-
|
|
77
|
-
///
|
|
74
|
+
///
|
|
78
75
|
/// Applies styles for small devices and up (min-width: 480px).
|
|
79
|
-
///
|
|
76
|
+
///
|
|
80
77
|
/// @name media_sm
|
|
81
78
|
/// @example scss - Usage
|
|
82
79
|
/// @include media_sm {
|
|
83
80
|
/// // Styles for small devices and up
|
|
84
81
|
/// }
|
|
85
|
-
///
|
|
82
|
+
///
|
|
86
83
|
@mixin media_sm {
|
|
87
|
-
@media (min-width: $media_sm) {
|
|
88
|
-
@content;
|
|
84
|
+
@media (min-width: $media_sm) {
|
|
85
|
+
@content;
|
|
89
86
|
}
|
|
90
87
|
}
|
|
91
88
|
|
|
92
|
-
|
|
93
|
-
///
|
|
89
|
+
///
|
|
94
90
|
/// Applies styles for medium devices and up (min-width: 768px).
|
|
95
|
-
///
|
|
91
|
+
///
|
|
96
92
|
/// @name media_md
|
|
97
|
-
///
|
|
93
|
+
///
|
|
98
94
|
/// @example scss - Usage
|
|
99
95
|
/// @include media_md {
|
|
100
96
|
/// // Styles for medium devices and up
|
|
101
97
|
/// }
|
|
102
|
-
///
|
|
98
|
+
///
|
|
103
99
|
@mixin media_md {
|
|
104
|
-
@media (min-width: $media_md) {
|
|
105
|
-
@content;
|
|
100
|
+
@media (min-width: $media_md) {
|
|
101
|
+
@content;
|
|
106
102
|
}
|
|
107
103
|
}
|
|
108
104
|
|
|
109
|
-
|
|
110
|
-
///
|
|
105
|
+
///
|
|
111
106
|
/// Applies styles for large devices and up (min-width: 1024px).
|
|
112
|
-
///
|
|
107
|
+
///
|
|
113
108
|
/// @name media_lg
|
|
114
|
-
///
|
|
109
|
+
///
|
|
115
110
|
/// @example scss - Usage
|
|
116
111
|
/// @include media_lg {
|
|
117
112
|
/// // Styles for large devices and up
|
|
118
113
|
/// }
|
|
119
|
-
///
|
|
114
|
+
///
|
|
120
115
|
@mixin media_lg {
|
|
121
|
-
@media (min-width: $media_lg) {
|
|
122
|
-
@content;
|
|
116
|
+
@media (min-width: $media_lg) {
|
|
117
|
+
@content;
|
|
123
118
|
}
|
|
124
119
|
}
|
|
125
120
|
|
|
126
|
-
|
|
127
|
-
///
|
|
121
|
+
///
|
|
128
122
|
/// Applies styles for extra-large devices and up (min-width: 1280px).
|
|
129
|
-
///
|
|
123
|
+
///
|
|
130
124
|
/// @name media_xl
|
|
131
|
-
///
|
|
125
|
+
///
|
|
132
126
|
/// @example scss - Usage
|
|
133
127
|
/// @include media_xl {
|
|
134
128
|
/// // Styles for extra-large devices and up
|
|
135
129
|
/// }
|
|
136
|
-
///
|
|
130
|
+
///
|
|
137
131
|
@mixin media_xl {
|
|
138
|
-
@media (min-width: $media_xl) {
|
|
139
|
-
@content;
|
|
132
|
+
@media (min-width: $media_xl) {
|
|
133
|
+
@content;
|
|
140
134
|
}
|
|
141
135
|
}
|
|
142
136
|
|
|
143
|
-
|
|
144
|
-
///
|
|
137
|
+
///
|
|
145
138
|
/// Applies styles for super-large devices and up (min-width: 1440px).
|
|
146
|
-
///
|
|
139
|
+
///
|
|
147
140
|
/// @name media_sl
|
|
148
|
-
///
|
|
141
|
+
///
|
|
149
142
|
/// @example scss - Usage
|
|
150
143
|
/// @include media_sl {
|
|
151
144
|
/// // Styles for super-large devices and up
|
|
152
145
|
/// }
|
|
153
|
-
///
|
|
146
|
+
///
|
|
154
147
|
@mixin media_sl {
|
|
155
|
-
@media (min-width: $media_sl) {
|
|
156
|
-
@content;
|
|
148
|
+
@media (min-width: $media_sl) {
|
|
149
|
+
@content;
|
|
157
150
|
}
|
|
158
151
|
}
|