@graupl/graupl 1.0.0-beta.1 → 1.0.0-beta.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/CHANGELOG.md +28 -0
- package/dist/css/base/button.css +1 -1
- package/dist/css/base/button.css.map +1 -1
- package/dist/css/base/form.css +1 -1
- package/dist/css/base/form.css.map +1 -1
- package/dist/css/base/link.css +1 -1
- package/dist/css/base/link.css.map +1 -1
- package/dist/css/base/table.css +1 -1
- package/dist/css/base/table.css.map +1 -1
- package/dist/css/base.css +1 -1
- package/dist/css/base.css.map +1 -1
- package/dist/css/component/accordion.css +1 -1
- package/dist/css/component/accordion.css.map +1 -1
- package/dist/css/component/alert.css +1 -1
- package/dist/css/component/alert.css.map +1 -1
- package/dist/css/component/card.css +1 -1
- package/dist/css/component/card.css.map +1 -1
- package/dist/css/component/carousel.css +1 -1
- package/dist/css/component/carousel.css.map +1 -1
- package/dist/css/component/input-group.css +1 -1
- package/dist/css/component/input-group.css.map +1 -1
- package/dist/css/component/list.css +2 -0
- package/dist/css/component/list.css.map +1 -0
- package/dist/css/component/menu.css +1 -1
- package/dist/css/component/menu.css.map +1 -1
- package/dist/css/component/navigation.css +1 -1
- package/dist/css/component/navigation.css.map +1 -1
- package/dist/css/component.css +1 -1
- package/dist/css/component.css.map +1 -1
- package/dist/css/graupl.css +1 -1
- package/dist/css/graupl.css.map +1 -1
- package/dist/css/layout/columns.css +1 -1
- package/dist/css/layout/columns.css.map +1 -1
- package/dist/css/layout/container.css +1 -1
- package/dist/css/layout/container.css.map +1 -1
- package/dist/css/layout/flex-columns.css +1 -1
- package/dist/css/layout/flex-columns.css.map +1 -1
- package/dist/css/layout.css +1 -1
- package/dist/css/layout.css.map +1 -1
- package/dist/css/normalize.css +1 -1
- package/dist/css/normalize.css.map +1 -1
- package/dist/css/state/focus.css +1 -1
- package/dist/css/state/focus.css.map +1 -1
- package/dist/css/state.css +1 -1
- package/dist/css/state.css.map +1 -1
- package/dist/css/theme/color.css +1 -1
- package/dist/css/theme/color.css.map +1 -1
- package/dist/css/theme/typography.css +1 -1
- package/dist/css/theme/typography.css.map +1 -1
- package/dist/css/theme.css +1 -1
- package/dist/css/theme.css.map +1 -1
- package/dist/css/utilities/alignment.css +1 -1
- package/dist/css/utilities/alignment.css.map +1 -1
- package/dist/css/utilities/border.css +2 -0
- package/dist/css/utilities/border.css.map +1 -0
- package/dist/css/utilities/color.css +1 -1
- package/dist/css/utilities/color.css.map +1 -1
- package/dist/css/utilities/display.css +1 -1
- package/dist/css/utilities/display.css.map +1 -1
- package/dist/css/utilities/flex.css +1 -1
- package/dist/css/utilities/flex.css.map +1 -1
- package/dist/css/utilities/height.css +1 -1
- package/dist/css/utilities/height.css.map +1 -1
- package/dist/css/utilities/inset.css +1 -1
- package/dist/css/utilities/inset.css.map +1 -1
- package/dist/css/utilities/justification.css +1 -1
- package/dist/css/utilities/justification.css.map +1 -1
- package/dist/css/utilities/list.css +1 -1
- package/dist/css/utilities/list.css.map +1 -1
- package/dist/css/utilities/order.css +1 -1
- package/dist/css/utilities/order.css.map +1 -1
- package/dist/css/utilities/postion.css +1 -1
- package/dist/css/utilities/postion.css.map +1 -1
- package/dist/css/utilities/ratio.css +1 -1
- package/dist/css/utilities/ratio.css.map +1 -1
- package/dist/css/utilities/spacing.css +1 -1
- package/dist/css/utilities/spacing.css.map +1 -1
- package/dist/css/utilities/typography.css +1 -1
- package/dist/css/utilities/typography.css.map +1 -1
- package/dist/css/utilities/visibility.css +1 -1
- package/dist/css/utilities/visibility.css.map +1 -1
- package/dist/css/utilities/width.css +1 -1
- package/dist/css/utilities/width.css.map +1 -1
- package/dist/css/utilities.css +1 -1
- package/dist/css/utilities.css.map +1 -1
- package/index.html +84 -12
- package/package.json +1 -1
- package/scss/component/list.scss +3 -0
- package/scss/utilities/border.scss +3 -0
- package/src/scss/_defaults.scss +14 -5
- package/src/scss/component/_index.scss +1 -0
- package/src/scss/component/input-group/_index.scss +1 -1
- package/src/scss/component/list/_defaults.scss +15 -0
- package/src/scss/component/list/_index.scss +50 -0
- package/src/scss/component/list/_variables.scss +176 -0
- package/src/scss/functions/_screen.scss +8 -0
- package/src/scss/functions/_utility.scss +28 -0
- package/src/scss/mixins/_layer.scss +5 -1
- package/src/scss/mixins/_screen.scss +24 -3
- package/src/scss/mixins/_state.scss +18 -0
- package/src/scss/mixins/_theme.scss +15 -0
- package/src/scss/mixins/_utility.scss +119 -17
- package/src/scss/theme/color/_index.scss +4 -4
- package/src/scss/utilities/_index.scss +1 -0
- package/src/scss/utilities/alignment/_defaults.scss +7 -5
- package/src/scss/utilities/alignment/_index.scss +117 -24
- package/src/scss/utilities/border/_defaults.scss +61 -0
- package/src/scss/utilities/border/_index.scss +269 -0
- package/src/scss/utilities/border/_variables.scss +6 -0
- package/src/scss/utilities/color/_defaults.scss +6 -4
- package/src/scss/utilities/color/_index.scss +137 -26
- package/src/scss/utilities/display/_defaults.scss +8 -4
- package/src/scss/utilities/display/_index.scss +88 -15
- package/src/scss/utilities/flex/_defaults.scss +30 -6
- package/src/scss/utilities/flex/_index.scss +215 -31
- package/src/scss/utilities/height/_defaults.scss +7 -5
- package/src/scss/utilities/height/_index.scss +183 -45
- package/src/scss/utilities/inset/_defaults.scss +4 -2
- package/src/scss/utilities/inset/_index.scss +58 -5
- package/src/scss/utilities/justification/_defaults.scss +7 -5
- package/src/scss/utilities/justification/_index.scss +117 -24
- package/src/scss/utilities/list/_defaults.scss +6 -4
- package/src/scss/utilities/list/_index.scss +86 -17
- package/src/scss/utilities/order/_defaults.scss +5 -3
- package/src/scss/utilities/order/_index.scss +68 -20
- package/src/scss/utilities/position/_defaults.scss +5 -3
- package/src/scss/utilities/position/_index.scss +55 -10
- package/src/scss/utilities/ratio/_defaults.scss +7 -5
- package/src/scss/utilities/ratio/_index.scss +49 -10
- package/src/scss/utilities/spacing/_defaults.scss +4 -2
- package/src/scss/utilities/spacing/_index.scss +225 -12
- package/src/scss/utilities/typography/_defaults.scss +21 -5
- package/src/scss/utilities/typography/_index.scss +577 -143
- package/src/scss/utilities/visibility/_defaults.scss +5 -3
- package/src/scss/utilities/visibility/_index.scss +56 -10
- package/src/scss/utilities/width/_defaults.scss +7 -5
- package/src/scss/utilities/width/_index.scss +183 -45
- package/stylelint.config.js +1 -0
|
@@ -8,215 +8,649 @@
|
|
|
8
8
|
@use "../../mixins/layer" as *;
|
|
9
9
|
@use "../../mixins/screen";
|
|
10
10
|
@use "../../mixins/utility";
|
|
11
|
+
@use "../../theme/color/variables" as color;
|
|
11
12
|
@use "../../theme/typography/variables" as typography;
|
|
12
13
|
@use "defaults";
|
|
13
14
|
@use "sass:map";
|
|
14
15
|
@use "variables" as *;
|
|
15
16
|
|
|
16
17
|
@include layer(utilities) {
|
|
18
|
+
$selector-prefix: root-defaults.$utility-selector-prefix;
|
|
19
|
+
|
|
17
20
|
// For each font size property, create a utility class.
|
|
18
21
|
@each $size, $value in typography.$font-sizes {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
$value
|
|
23
|
-
);
|
|
22
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}#{$size}";
|
|
23
|
+
|
|
24
|
+
@include utility.create($selector, font-size, $value);
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
// Create utility classes for each type of text style in Graupl.
|
|
27
28
|
// These will apply not only the font size, but also the margin, font weight, and line height.
|
|
28
29
|
// This will allow for a more consistent and maintainable typography system.
|
|
29
|
-
|
|
30
|
-
margin: important.insert(typography.$paragraph-margin);
|
|
31
|
-
font-size: important.insert(typography.$paragraph-font-size);
|
|
32
|
-
font-weight: important.insert(typography.$paragraph-font-weight);
|
|
33
|
-
line-height: important.insert(typography.$paragraph-line-height);
|
|
34
|
-
}
|
|
30
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}paragraph";
|
|
35
31
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
32
|
+
@include utility.create-mapped(
|
|
33
|
+
$selector,
|
|
34
|
+
(
|
|
35
|
+
margin: typography.$paragraph-margin,
|
|
36
|
+
font-size: typography.$paragraph-font-size,
|
|
37
|
+
font-weight: typography.$paragraph-font-weight,
|
|
38
|
+
line-height: typography.$paragraph-line-height,
|
|
39
|
+
)
|
|
40
|
+
);
|
|
42
41
|
|
|
43
|
-
|
|
44
|
-
margin: important.insert(typography.$h1-margin);
|
|
45
|
-
font-family: important.insert(typography.$h1-font-family);
|
|
46
|
-
font-size: important.insert(typography.$h1-font-size);
|
|
47
|
-
font-weight: important.insert(typography.$h1-font-weight);
|
|
48
|
-
line-height: important.insert(typography.$h1-line-height);
|
|
49
|
-
}
|
|
42
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}small";
|
|
50
43
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
44
|
+
@include utility.create-mapped(
|
|
45
|
+
$selector,
|
|
46
|
+
(
|
|
47
|
+
margin: typography.$small-margin,
|
|
48
|
+
font-size: typography.$small-font-size,
|
|
49
|
+
font-weight: typography.$small-font-weight,
|
|
50
|
+
line-height: typography.$small-line-height,
|
|
51
|
+
)
|
|
52
|
+
);
|
|
58
53
|
|
|
59
|
-
|
|
60
|
-
margin: important.insert(typography.$h3-margin);
|
|
61
|
-
font-family: important.insert(typography.$h3-font-family);
|
|
62
|
-
font-size: important.insert(typography.$h3-font-size);
|
|
63
|
-
font-weight: important.insert(typography.$h3-font-weight);
|
|
64
|
-
line-height: important.insert(typography.$h3-line-height);
|
|
65
|
-
}
|
|
54
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h1";
|
|
66
55
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
56
|
+
@include utility.create-mapped(
|
|
57
|
+
$selector,
|
|
58
|
+
(
|
|
59
|
+
margin: typography.$h1-margin,
|
|
60
|
+
font-family: typography.$h1-font-family,
|
|
61
|
+
font-size: typography.$h1-font-size,
|
|
62
|
+
font-weight: typography.$h1-font-weight,
|
|
63
|
+
line-height: typography.$h1-line-height,
|
|
64
|
+
)
|
|
65
|
+
);
|
|
74
66
|
|
|
75
|
-
|
|
76
|
-
margin: important.insert(typography.$h5-margin);
|
|
77
|
-
font-family: important.insert(typography.$h5-font-family);
|
|
78
|
-
font-size: important.insert(typography.$h5-font-size);
|
|
79
|
-
font-weight: important.insert(typography.$h5-font-weight);
|
|
80
|
-
line-height: important.insert(typography.$h5-line-height);
|
|
81
|
-
}
|
|
67
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h2";
|
|
82
68
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
69
|
+
@include utility.create-mapped(
|
|
70
|
+
$selector,
|
|
71
|
+
(
|
|
72
|
+
margin: typography.$h2-margin,
|
|
73
|
+
font-family: typography.$h2-font-family,
|
|
74
|
+
font-size: typography.$h2-font-size,
|
|
75
|
+
font-weight: typography.$h2-font-weight,
|
|
76
|
+
line-height: typography.$h2-line-height,
|
|
77
|
+
)
|
|
78
|
+
);
|
|
79
|
+
|
|
80
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h3";
|
|
81
|
+
|
|
82
|
+
@include utility.create-mapped(
|
|
83
|
+
$selector,
|
|
84
|
+
(
|
|
85
|
+
margin: typography.$h3-margin,
|
|
86
|
+
font-family: typography.$h3-font-family,
|
|
87
|
+
font-size: typography.$h3-font-size,
|
|
88
|
+
font-weight: typography.$h3-font-weight,
|
|
89
|
+
line-height: typography.$h3-line-height,
|
|
90
|
+
)
|
|
91
|
+
);
|
|
92
|
+
|
|
93
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h4";
|
|
94
|
+
|
|
95
|
+
@include utility.create-mapped(
|
|
96
|
+
$selector,
|
|
97
|
+
(
|
|
98
|
+
margin: typography.$h4-margin,
|
|
99
|
+
font-family: typography.$h4-font-family,
|
|
100
|
+
font-size: typography.$h4-font-size,
|
|
101
|
+
font-weight: typography.$h4-font-weight,
|
|
102
|
+
line-height: typography.$h4-line-height,
|
|
103
|
+
)
|
|
104
|
+
);
|
|
105
|
+
|
|
106
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h5";
|
|
107
|
+
|
|
108
|
+
@include utility.create-mapped(
|
|
109
|
+
$selector,
|
|
110
|
+
(
|
|
111
|
+
margin: typography.$h5-margin,
|
|
112
|
+
font-family: typography.$h5-font-family,
|
|
113
|
+
font-size: typography.$h5-font-size,
|
|
114
|
+
font-weight: typography.$h5-font-weight,
|
|
115
|
+
line-height: typography.$h5-line-height,
|
|
116
|
+
)
|
|
117
|
+
);
|
|
118
|
+
|
|
119
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h6";
|
|
120
|
+
|
|
121
|
+
@include utility.create-mapped(
|
|
122
|
+
$selector,
|
|
123
|
+
(
|
|
124
|
+
margin: typography.$h6-margin,
|
|
125
|
+
font-family: typography.$h6-font-family,
|
|
126
|
+
font-size: typography.$h6-font-size,
|
|
127
|
+
font-weight: typography.$h6-font-weight,
|
|
128
|
+
line-height: typography.$h6-line-height,
|
|
129
|
+
)
|
|
130
|
+
);
|
|
90
131
|
|
|
91
132
|
// For each font weight property, create a utility class.
|
|
92
|
-
@each $
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
$value
|
|
97
|
-
);
|
|
133
|
+
@each $weight, $value in typography.$font-weights {
|
|
134
|
+
$selector: "#{$selector-prefix}#{defaults.$font-weight-selector-prefix}#{$weight}";
|
|
135
|
+
|
|
136
|
+
@include utility.create($selector, font-weight, $value);
|
|
98
137
|
}
|
|
99
138
|
|
|
100
139
|
// For each font style property, create a utility class.
|
|
101
|
-
@each $
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
140
|
+
@each $style, $value in defaults.$font-style-properties {
|
|
141
|
+
$selector: "#{$selector-prefix}#{defaults.$font-style-selector-prefix}#{$style}";
|
|
142
|
+
|
|
143
|
+
@include utility.create($selector, font-style, $value);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// For each text transform property, create a utility class.
|
|
147
|
+
@each $transform, $value in defaults.$text-transform-properties {
|
|
148
|
+
$selector: "#{$selector-prefix}#{defaults.$text-transform-selector-prefix}#{$transform}";
|
|
149
|
+
|
|
150
|
+
@include utility.create($selector, text-transform, $value);
|
|
107
151
|
}
|
|
108
152
|
|
|
109
|
-
// Generate
|
|
110
|
-
@if defaults.$
|
|
111
|
-
@each $screen-
|
|
153
|
+
// Generate screen-aware utilities.
|
|
154
|
+
@if defaults.$screen-aware and root-defaults.$screen-aware-utilities {
|
|
155
|
+
@each $screen-name in map.keys(root-defaults.$screen-sizes) {
|
|
156
|
+
$selector-prefix: "#{root-defaults.$utility-selector-prefix}#{$screen-name}#{root-defaults.$utility-screen-aware-separator}";
|
|
157
|
+
|
|
112
158
|
// For each font size property, create a utility class.
|
|
113
159
|
@each $size, $value in typography.$font-sizes {
|
|
160
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}#{$size}";
|
|
161
|
+
|
|
114
162
|
@include utility.create(
|
|
115
|
-
|
|
163
|
+
$selector,
|
|
116
164
|
font-size,
|
|
117
165
|
$value,
|
|
118
|
-
$screen-
|
|
166
|
+
$screen: $screen-name
|
|
119
167
|
);
|
|
120
168
|
}
|
|
121
169
|
|
|
122
170
|
// Create utility classes for each type of text style in Graupl.
|
|
123
171
|
// These will apply not only the font size, but also the margin, font weight, and line height.
|
|
124
172
|
// This will allow for a more consistent and maintainable typography system.
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
173
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}paragraph";
|
|
174
|
+
|
|
175
|
+
@include utility.create-mapped(
|
|
176
|
+
$selector,
|
|
177
|
+
(
|
|
178
|
+
margin: typography.$paragraph-margin,
|
|
179
|
+
font-size: typography.$paragraph-font-size,
|
|
180
|
+
font-weight: typography.$paragraph-font-weight,
|
|
181
|
+
line-height: typography.$paragraph-line-height,
|
|
182
|
+
),
|
|
183
|
+
$screen: $screen-name
|
|
184
|
+
);
|
|
185
|
+
|
|
186
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}small";
|
|
187
|
+
|
|
188
|
+
@include utility.create-mapped(
|
|
189
|
+
$selector,
|
|
190
|
+
(
|
|
191
|
+
margin: typography.$small-margin,
|
|
192
|
+
font-size: typography.$small-font-size,
|
|
193
|
+
font-weight: typography.$small-font-weight,
|
|
194
|
+
line-height: typography.$small-line-height,
|
|
195
|
+
),
|
|
196
|
+
$screen: $screen-name
|
|
197
|
+
);
|
|
198
|
+
|
|
199
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h1";
|
|
200
|
+
|
|
201
|
+
@include utility.create-mapped(
|
|
202
|
+
$selector,
|
|
203
|
+
(
|
|
204
|
+
margin: typography.$h1-margin,
|
|
205
|
+
font-family: typography.$h1-font-family,
|
|
206
|
+
font-size: typography.$h1-font-size,
|
|
207
|
+
font-weight: typography.$h1-font-weight,
|
|
208
|
+
line-height: typography.$h1-line-height,
|
|
209
|
+
),
|
|
210
|
+
$screen: $screen-name
|
|
211
|
+
);
|
|
212
|
+
|
|
213
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h2";
|
|
214
|
+
|
|
215
|
+
@include utility.create-mapped(
|
|
216
|
+
$selector,
|
|
217
|
+
(
|
|
218
|
+
margin: typography.$h2-margin,
|
|
219
|
+
font-family: typography.$h2-font-family,
|
|
220
|
+
font-size: typography.$h2-font-size,
|
|
221
|
+
font-weight: typography.$h2-font-weight,
|
|
222
|
+
line-height: typography.$h2-line-height,
|
|
223
|
+
),
|
|
224
|
+
$screen: $screen-name
|
|
225
|
+
);
|
|
226
|
+
|
|
227
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h3";
|
|
228
|
+
|
|
229
|
+
@include utility.create-mapped(
|
|
230
|
+
$selector,
|
|
231
|
+
(
|
|
232
|
+
margin: typography.$h3-margin,
|
|
233
|
+
font-family: typography.$h3-font-family,
|
|
234
|
+
font-size: typography.$h3-font-size,
|
|
235
|
+
font-weight: typography.$h3-font-weight,
|
|
236
|
+
line-height: typography.$h3-line-height,
|
|
237
|
+
),
|
|
238
|
+
$screen: $screen-name
|
|
239
|
+
);
|
|
240
|
+
|
|
241
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h4";
|
|
242
|
+
|
|
243
|
+
@include utility.create-mapped(
|
|
244
|
+
$selector,
|
|
245
|
+
(
|
|
246
|
+
margin: typography.$h4-margin,
|
|
247
|
+
font-family: typography.$h4-font-family,
|
|
248
|
+
font-size: typography.$h4-font-size,
|
|
249
|
+
font-weight: typography.$h4-font-weight,
|
|
250
|
+
line-height: typography.$h4-line-height,
|
|
251
|
+
),
|
|
252
|
+
$screen: $screen-name
|
|
253
|
+
);
|
|
254
|
+
|
|
255
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h5";
|
|
256
|
+
|
|
257
|
+
@include utility.create-mapped(
|
|
258
|
+
$selector,
|
|
259
|
+
(
|
|
260
|
+
margin: typography.$h5-margin,
|
|
261
|
+
font-family: typography.$h5-font-family,
|
|
262
|
+
font-size: typography.$h5-font-size,
|
|
263
|
+
font-weight: typography.$h5-font-weight,
|
|
264
|
+
line-height: typography.$h5-line-height,
|
|
265
|
+
),
|
|
266
|
+
$screen: $screen-name
|
|
267
|
+
);
|
|
268
|
+
|
|
269
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h6";
|
|
270
|
+
|
|
271
|
+
@include utility.create-mapped(
|
|
272
|
+
$selector,
|
|
273
|
+
(
|
|
274
|
+
margin: typography.$h6-margin,
|
|
275
|
+
font-family: typography.$h6-font-family,
|
|
276
|
+
font-size: typography.$h6-font-size,
|
|
277
|
+
font-weight: typography.$h6-font-weight,
|
|
278
|
+
line-height: typography.$h6-line-height,
|
|
279
|
+
),
|
|
280
|
+
$screen: $screen-name
|
|
281
|
+
);
|
|
282
|
+
|
|
283
|
+
// For each font weight property, create a utility class.
|
|
284
|
+
@each $weight, $value in typography.$font-weights {
|
|
285
|
+
$selector: "#{$selector-prefix}#{defaults.$font-weight-selector-prefix}#{$weight}";
|
|
286
|
+
|
|
287
|
+
@include utility.create(
|
|
288
|
+
$selector,
|
|
289
|
+
font-weight,
|
|
290
|
+
$value,
|
|
291
|
+
$screen: $screen-name
|
|
292
|
+
);
|
|
132
293
|
}
|
|
133
294
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
295
|
+
// For each font style property, create a utility class.
|
|
296
|
+
@each $style, $value in defaults.$font-style-properties {
|
|
297
|
+
$selector: "#{$selector-prefix}#{defaults.$font-style-selector-prefix}#{$style}";
|
|
298
|
+
|
|
299
|
+
@include utility.create(
|
|
300
|
+
$selector,
|
|
301
|
+
font-style,
|
|
302
|
+
$value,
|
|
303
|
+
$screen: $screen-name
|
|
304
|
+
);
|
|
141
305
|
}
|
|
142
306
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
307
|
+
// For each text transform property, create a utility class.
|
|
308
|
+
@each $transform, $value in defaults.$text-transform-properties {
|
|
309
|
+
$selector: "#{$selector-prefix}#{defaults.$text-transform-selector-prefix}#{$transform}";
|
|
310
|
+
|
|
311
|
+
@include utility.create(
|
|
312
|
+
$selector,
|
|
313
|
+
text-transform,
|
|
314
|
+
$value,
|
|
315
|
+
$screen: $screen-name
|
|
316
|
+
);
|
|
151
317
|
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
152
320
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
321
|
+
// Generate theme-aware utilities.
|
|
322
|
+
@if defaults.$theme-aware and root-defaults.$theme-aware-utilities {
|
|
323
|
+
@each $theme-name, $colors in color.$themes {
|
|
324
|
+
@if $theme-name != active {
|
|
325
|
+
$selector-prefix: "#{root-defaults.$utility-selector-prefix}#{$theme-name}#{root-defaults.$utility-theme-aware-separator}";
|
|
326
|
+
|
|
327
|
+
// For each font size property, create a utility class.
|
|
328
|
+
@each $size, $value in typography.$font-sizes {
|
|
329
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}#{$size}";
|
|
330
|
+
|
|
331
|
+
@include utility.create(
|
|
332
|
+
$selector,
|
|
333
|
+
font-size,
|
|
334
|
+
$value,
|
|
335
|
+
$theme: $theme-name
|
|
336
|
+
);
|
|
160
337
|
}
|
|
161
|
-
}
|
|
162
338
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
339
|
+
// Create utility classes for each type of text style in Graupl.
|
|
340
|
+
// These will apply not only the font size, but also the margin, font weight, and line height.
|
|
341
|
+
// This will allow for a more consistent and maintainable typography system.
|
|
342
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}paragraph";
|
|
343
|
+
|
|
344
|
+
@include utility.create-mapped(
|
|
345
|
+
$selector,
|
|
346
|
+
(
|
|
347
|
+
margin: typography.$paragraph-margin,
|
|
348
|
+
font-size: typography.$paragraph-font-size,
|
|
349
|
+
font-weight: typography.$paragraph-font-weight,
|
|
350
|
+
line-height: typography.$paragraph-line-height,
|
|
351
|
+
),
|
|
352
|
+
$theme: $theme-name
|
|
353
|
+
);
|
|
354
|
+
|
|
355
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}small";
|
|
356
|
+
|
|
357
|
+
@include utility.create-mapped(
|
|
358
|
+
$selector,
|
|
359
|
+
(
|
|
360
|
+
margin: typography.$small-margin,
|
|
361
|
+
font-size: typography.$small-font-size,
|
|
362
|
+
font-weight: typography.$small-font-weight,
|
|
363
|
+
line-height: typography.$small-line-height,
|
|
364
|
+
),
|
|
365
|
+
$theme: $theme-name
|
|
366
|
+
);
|
|
367
|
+
|
|
368
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h1";
|
|
369
|
+
|
|
370
|
+
@include utility.create-mapped(
|
|
371
|
+
$selector,
|
|
372
|
+
(
|
|
373
|
+
margin: typography.$h1-margin,
|
|
374
|
+
font-family: typography.$h1-font-family,
|
|
375
|
+
font-size: typography.$h1-font-size,
|
|
376
|
+
font-weight: typography.$h1-font-weight,
|
|
377
|
+
line-height: typography.$h1-line-height,
|
|
378
|
+
),
|
|
379
|
+
$theme: $theme-name
|
|
380
|
+
);
|
|
381
|
+
|
|
382
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h2";
|
|
383
|
+
|
|
384
|
+
@include utility.create-mapped(
|
|
385
|
+
$selector,
|
|
386
|
+
(
|
|
387
|
+
margin: typography.$h2-margin,
|
|
388
|
+
font-family: typography.$h2-font-family,
|
|
389
|
+
font-size: typography.$h2-font-size,
|
|
390
|
+
font-weight: typography.$h2-font-weight,
|
|
391
|
+
line-height: typography.$h2-line-height,
|
|
392
|
+
),
|
|
393
|
+
$theme: $theme-name
|
|
394
|
+
);
|
|
395
|
+
|
|
396
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h3";
|
|
397
|
+
|
|
398
|
+
@include utility.create-mapped(
|
|
399
|
+
$selector,
|
|
400
|
+
(
|
|
401
|
+
margin: typography.$h3-margin,
|
|
402
|
+
font-family: typography.$h3-font-family,
|
|
403
|
+
font-size: typography.$h3-font-size,
|
|
404
|
+
font-weight: typography.$h3-font-weight,
|
|
405
|
+
line-height: typography.$h3-line-height,
|
|
406
|
+
),
|
|
407
|
+
$theme: $theme-name
|
|
408
|
+
);
|
|
409
|
+
|
|
410
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h4";
|
|
411
|
+
|
|
412
|
+
@include utility.create-mapped(
|
|
413
|
+
$selector,
|
|
414
|
+
(
|
|
415
|
+
margin: typography.$h4-margin,
|
|
416
|
+
font-family: typography.$h4-font-family,
|
|
417
|
+
font-size: typography.$h4-font-size,
|
|
418
|
+
font-weight: typography.$h4-font-weight,
|
|
419
|
+
line-height: typography.$h4-line-height,
|
|
420
|
+
),
|
|
421
|
+
$theme: $theme-name
|
|
422
|
+
);
|
|
423
|
+
|
|
424
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h5";
|
|
425
|
+
|
|
426
|
+
@include utility.create-mapped(
|
|
427
|
+
$selector,
|
|
428
|
+
(
|
|
429
|
+
margin: typography.$h5-margin,
|
|
430
|
+
font-family: typography.$h5-font-family,
|
|
431
|
+
font-size: typography.$h5-font-size,
|
|
432
|
+
font-weight: typography.$h5-font-weight,
|
|
433
|
+
line-height: typography.$h5-line-height,
|
|
434
|
+
),
|
|
435
|
+
$theme: $theme-name
|
|
436
|
+
);
|
|
437
|
+
|
|
438
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h6";
|
|
439
|
+
|
|
440
|
+
@include utility.create-mapped(
|
|
441
|
+
$selector,
|
|
442
|
+
(
|
|
443
|
+
margin: typography.$h6-margin,
|
|
444
|
+
font-family: typography.$h6-font-family,
|
|
445
|
+
font-size: typography.$h6-font-size,
|
|
446
|
+
font-weight: typography.$h6-font-weight,
|
|
447
|
+
line-height: typography.$h6-line-height,
|
|
448
|
+
),
|
|
449
|
+
$theme: $theme-name
|
|
450
|
+
);
|
|
451
|
+
|
|
452
|
+
// For each font weight property, create a utility class.
|
|
453
|
+
@each $weight, $value in typography.$font-weights {
|
|
454
|
+
$selector: "#{$selector-prefix}#{defaults.$font-weight-selector-prefix}#{$weight}";
|
|
455
|
+
|
|
456
|
+
@include utility.create(
|
|
457
|
+
$selector,
|
|
458
|
+
font-weight,
|
|
459
|
+
$value,
|
|
460
|
+
$theme: $theme-name
|
|
461
|
+
);
|
|
170
462
|
}
|
|
171
|
-
}
|
|
172
463
|
|
|
173
|
-
|
|
174
|
-
@
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
464
|
+
// For each font style property, create a utility class.
|
|
465
|
+
@each $style, $value in defaults.$font-style-properties {
|
|
466
|
+
$selector: "#{$selector-prefix}#{defaults.$font-style-selector-prefix}#{$style}";
|
|
467
|
+
|
|
468
|
+
@include utility.create(
|
|
469
|
+
$selector,
|
|
470
|
+
font-style,
|
|
471
|
+
$value,
|
|
472
|
+
$theme: $theme-name
|
|
473
|
+
);
|
|
180
474
|
}
|
|
181
|
-
}
|
|
182
475
|
|
|
183
|
-
|
|
184
|
-
@
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
476
|
+
// For each text transform property, create a utility class.
|
|
477
|
+
@each $transform, $value in defaults.$text-transform-properties {
|
|
478
|
+
$selector: "#{$selector-prefix}#{defaults.$text-transform-selector-prefix}#{$transform}";
|
|
479
|
+
|
|
480
|
+
@include utility.create(
|
|
481
|
+
$selector,
|
|
482
|
+
text-transform,
|
|
483
|
+
$value,
|
|
484
|
+
$theme: $theme-name
|
|
485
|
+
);
|
|
190
486
|
}
|
|
191
487
|
}
|
|
488
|
+
}
|
|
489
|
+
}
|
|
192
490
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
}
|
|
491
|
+
// Generate state-aware utilities.
|
|
492
|
+
@if defaults.$state-aware and root-defaults.$state-aware-utilities {
|
|
493
|
+
@each $state-name, $value in root-defaults.$state-selectors {
|
|
494
|
+
$selector-prefix: "#{root-defaults.$utility-selector-prefix}#{$state-name}#{root-defaults.$utility-state-aware-separator}";
|
|
495
|
+
|
|
496
|
+
// For each font size property, create a utility class.
|
|
497
|
+
@each $size, $value in typography.$font-sizes {
|
|
498
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}#{$size}";
|
|
499
|
+
|
|
500
|
+
@include utility.create(
|
|
501
|
+
$selector,
|
|
502
|
+
font-size,
|
|
503
|
+
$value,
|
|
504
|
+
$state: $state-name
|
|
505
|
+
);
|
|
201
506
|
}
|
|
202
507
|
|
|
508
|
+
// Create utility classes for each type of text style in Graupl.
|
|
509
|
+
// These will apply not only the font size, but also the margin, font weight, and line height.
|
|
510
|
+
// This will allow for a more consistent and maintainable typography system.
|
|
511
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}paragraph";
|
|
512
|
+
|
|
513
|
+
@include utility.create-mapped(
|
|
514
|
+
$selector,
|
|
515
|
+
(
|
|
516
|
+
margin: typography.$paragraph-margin,
|
|
517
|
+
font-size: typography.$paragraph-font-size,
|
|
518
|
+
font-weight: typography.$paragraph-font-weight,
|
|
519
|
+
line-height: typography.$paragraph-line-height,
|
|
520
|
+
),
|
|
521
|
+
$state: $state-name
|
|
522
|
+
);
|
|
523
|
+
|
|
524
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}small";
|
|
525
|
+
|
|
526
|
+
@include utility.create-mapped(
|
|
527
|
+
$selector,
|
|
528
|
+
(
|
|
529
|
+
margin: typography.$small-margin,
|
|
530
|
+
font-size: typography.$small-font-size,
|
|
531
|
+
font-weight: typography.$small-font-weight,
|
|
532
|
+
line-height: typography.$small-line-height,
|
|
533
|
+
),
|
|
534
|
+
$state: $state-name
|
|
535
|
+
);
|
|
536
|
+
|
|
537
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h1";
|
|
538
|
+
|
|
539
|
+
@include utility.create-mapped(
|
|
540
|
+
$selector,
|
|
541
|
+
(
|
|
542
|
+
margin: typography.$h1-margin,
|
|
543
|
+
font-family: typography.$h1-font-family,
|
|
544
|
+
font-size: typography.$h1-font-size,
|
|
545
|
+
font-weight: typography.$h1-font-weight,
|
|
546
|
+
line-height: typography.$h1-line-height,
|
|
547
|
+
),
|
|
548
|
+
$state: $state-name
|
|
549
|
+
);
|
|
550
|
+
|
|
551
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h2";
|
|
552
|
+
|
|
553
|
+
@include utility.create-mapped(
|
|
554
|
+
$selector,
|
|
555
|
+
(
|
|
556
|
+
margin: typography.$h2-margin,
|
|
557
|
+
font-family: typography.$h2-font-family,
|
|
558
|
+
font-size: typography.$h2-font-size,
|
|
559
|
+
font-weight: typography.$h2-font-weight,
|
|
560
|
+
line-height: typography.$h2-line-height,
|
|
561
|
+
),
|
|
562
|
+
$state: $state-name
|
|
563
|
+
);
|
|
564
|
+
|
|
565
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h3";
|
|
566
|
+
|
|
567
|
+
@include utility.create-mapped(
|
|
568
|
+
$selector,
|
|
569
|
+
(
|
|
570
|
+
margin: typography.$h3-margin,
|
|
571
|
+
font-family: typography.$h3-font-family,
|
|
572
|
+
font-size: typography.$h3-font-size,
|
|
573
|
+
font-weight: typography.$h3-font-weight,
|
|
574
|
+
line-height: typography.$h3-line-height,
|
|
575
|
+
),
|
|
576
|
+
$state: $state-name
|
|
577
|
+
);
|
|
578
|
+
|
|
579
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h4";
|
|
580
|
+
|
|
581
|
+
@include utility.create-mapped(
|
|
582
|
+
$selector,
|
|
583
|
+
(
|
|
584
|
+
margin: typography.$h4-margin,
|
|
585
|
+
font-family: typography.$h4-font-family,
|
|
586
|
+
font-size: typography.$h4-font-size,
|
|
587
|
+
font-weight: typography.$h4-font-weight,
|
|
588
|
+
line-height: typography.$h4-line-height,
|
|
589
|
+
),
|
|
590
|
+
$state: $state-name
|
|
591
|
+
);
|
|
592
|
+
|
|
593
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h5";
|
|
594
|
+
|
|
595
|
+
@include utility.create-mapped(
|
|
596
|
+
$selector,
|
|
597
|
+
(
|
|
598
|
+
margin: typography.$h5-margin,
|
|
599
|
+
font-family: typography.$h5-font-family,
|
|
600
|
+
font-size: typography.$h5-font-size,
|
|
601
|
+
font-weight: typography.$h5-font-weight,
|
|
602
|
+
line-height: typography.$h5-line-height,
|
|
603
|
+
),
|
|
604
|
+
$state: $state-name
|
|
605
|
+
);
|
|
606
|
+
|
|
607
|
+
$selector: "#{$selector-prefix}#{defaults.$text-selector-prefix}h6";
|
|
608
|
+
|
|
609
|
+
@include utility.create-mapped(
|
|
610
|
+
$selector,
|
|
611
|
+
(
|
|
612
|
+
margin: typography.$h6-margin,
|
|
613
|
+
font-family: typography.$h6-font-family,
|
|
614
|
+
font-size: typography.$h6-font-size,
|
|
615
|
+
font-weight: typography.$h6-font-weight,
|
|
616
|
+
line-height: typography.$h6-line-height,
|
|
617
|
+
),
|
|
618
|
+
$state: $state-name
|
|
619
|
+
);
|
|
620
|
+
|
|
203
621
|
// For each font weight property, create a utility class.
|
|
204
|
-
@each $
|
|
622
|
+
@each $weight, $value in typography.$font-weights {
|
|
623
|
+
$selector: "#{$selector-prefix}#{defaults.$font-weight-selector-prefix}#{$weight}";
|
|
624
|
+
|
|
205
625
|
@include utility.create(
|
|
206
|
-
|
|
626
|
+
$selector,
|
|
207
627
|
font-weight,
|
|
208
628
|
$value,
|
|
209
|
-
$
|
|
629
|
+
$state: $state-name
|
|
210
630
|
);
|
|
211
631
|
}
|
|
212
632
|
|
|
213
633
|
// For each font style property, create a utility class.
|
|
214
|
-
@each $
|
|
634
|
+
@each $style, $value in defaults.$font-style-properties {
|
|
635
|
+
$selector: "#{$selector-prefix}#{defaults.$font-style-selector-prefix}#{$style}";
|
|
636
|
+
|
|
215
637
|
@include utility.create(
|
|
216
|
-
|
|
638
|
+
$selector,
|
|
217
639
|
font-style,
|
|
218
640
|
$value,
|
|
219
|
-
$
|
|
641
|
+
$state: $state-name
|
|
642
|
+
);
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
// For each text transform property, create a utility class.
|
|
646
|
+
@each $transform, $value in defaults.$text-transform-properties {
|
|
647
|
+
$selector: "#{$selector-prefix}#{defaults.$text-transform-selector-prefix}#{$transform}";
|
|
648
|
+
|
|
649
|
+
@include utility.create(
|
|
650
|
+
$selector,
|
|
651
|
+
text-transform,
|
|
652
|
+
$value,
|
|
653
|
+
$state: $state-name
|
|
220
654
|
);
|
|
221
655
|
}
|
|
222
656
|
}
|