yummacss 3.0.2 → 3.1.0
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 +66 -66
- package/dist/cli/commands/init.js +3 -5
- package/dist/cli/services/configLoader.js +4 -30
- package/package.json +6 -13
- package/src/_fonts.scss +16 -16
- package/src/abstracts/_breakpoints.scss +45 -45
- package/src/abstracts/_index.scss +5 -5
- package/src/abstracts/_theme.scss +21 -21
- package/src/abstracts/_variables.scss +83 -82
- package/src/abstracts/functions/_create-values.scss +16 -16
- package/src/abstracts/functions/_ignore-neutral.scss +7 -9
- package/src/abstracts/functions/_index.scss +2 -2
- package/src/abstracts/mixins/_create-colors.scss +90 -39
- package/src/abstracts/mixins/_create-utilities.scss +53 -39
- package/src/abstracts/mixins/_index.scss +2 -3
- package/src/reset/_stylecent.scss +231 -231
- package/src/utilities/_background.scss +95 -95
- package/src/utilities/_border.scss +313 -313
- package/src/utilities/_box-model.scss +290 -290
- package/src/utilities/_color.scss +85 -85
- package/src/utilities/_effect.scss +98 -98
- package/src/utilities/_flexbox.scss +213 -175
- package/src/utilities/_grid.scss +322 -322
- package/src/utilities/_index.scss +14 -14
- package/src/utilities/_interactivity.scss +304 -304
- package/src/utilities/_outline.scss +53 -53
- package/src/utilities/_positioning.scss +436 -436
- package/src/utilities/_svg.scss +27 -27
- package/src/utilities/_table.scss +35 -35
- package/src/utilities/_transform.scss +164 -164
- package/src/utilities/_typography.scss +278 -278
- package/src/utilities/maps/_index.scss +12 -12
- package/src/utilities/maps/box-model/_dimension.scss +16 -16
- package/src/utilities/maps/box-model/_height.scss +16 -16
- package/src/utilities/maps/box-model/_margin.scss +10 -10
- package/src/utilities/maps/box-model/_padding.scss +10 -10
- package/src/utilities/maps/box-model/_width.scss +16 -16
- package/src/utilities/maps/flexbox/_flex-basis.scss +12 -12
- package/src/utilities/maps/grid/_gap.scss +5 -5
- package/src/yummacss-core.scss +3 -3
- package/src/yummacss.scss +4 -4
- package/dist/cli/config/templates.js +0 -33
- package/src/abstracts/mixins/_extend-utilities.scss +0 -24
|
@@ -1,39 +1,90 @@
|
|
|
1
|
-
@use "sass:color";
|
|
2
|
-
|
|
3
|
-
@mixin
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
1
|
+
@use "sass:color";
|
|
2
|
+
|
|
3
|
+
@mixin color-scaling($property, $prefix, $k, $v) {
|
|
4
|
+
|
|
5
|
+
// base styles
|
|
6
|
+
.#{$prefix}-#{$k} {
|
|
7
|
+
#{$property}: $v;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
// focus styles
|
|
11
|
+
.f\:#{$prefix}-#{$k} {
|
|
12
|
+
&:focus {
|
|
13
|
+
#{$property}: $v;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// active styles
|
|
18
|
+
.a\:#{$prefix}-#{$k} {
|
|
19
|
+
&:active {
|
|
20
|
+
#{$property}: $v;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// hover styles
|
|
25
|
+
.h\:#{$prefix}-#{$k} {
|
|
26
|
+
&:hover {
|
|
27
|
+
#{$property}: $v;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@mixin shade-scaling($property, $prefix, $k, $v, $percentage) {
|
|
33
|
+
@for $i from 1 through 13 {
|
|
34
|
+
@if $i <=6 {
|
|
35
|
+
|
|
36
|
+
// base styles
|
|
37
|
+
.#{$prefix}-#{$k}-#{$i} {
|
|
38
|
+
#{$property}: color.mix(white, $v, (7 - $i) * $percentage);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// focus styles
|
|
42
|
+
.f\:#{$prefix}-#{$k}-#{$i} {
|
|
43
|
+
&:focus {
|
|
44
|
+
#{$property}: color.mix(white, $v, (7 - $i) * $percentage);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// active styles
|
|
49
|
+
.a\:#{$prefix}-#{$k}-#{$i} {
|
|
50
|
+
&:active {
|
|
51
|
+
#{$property}: color.mix(white, $v, (7 - $i) * $percentage);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// hover styles
|
|
56
|
+
.h\:#{$prefix}-#{$k}-#{$i} {
|
|
57
|
+
&:hover {
|
|
58
|
+
#{$property}: color.mix(white, $v, (7 - $i) * $percentage);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
} @else if $i >7 {
|
|
62
|
+
|
|
63
|
+
// base styles
|
|
64
|
+
.#{$prefix}-#{$k}-#{$i - 1} {
|
|
65
|
+
#{$property}: color.mix(black, $v, ($i - 7) * $percentage);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// focus styles
|
|
69
|
+
.f\:#{$prefix}-#{$k}-#{$i - 1} {
|
|
70
|
+
&:focus {
|
|
71
|
+
#{$property}: color.mix(black, $v, ($i - 7) * $percentage);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// active styles
|
|
76
|
+
.a\:#{$prefix}-#{$k}-#{$i - 1} {
|
|
77
|
+
&:active {
|
|
78
|
+
#{$property}: color.mix(black, $v, ($i - 7) * $percentage);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// hover styles
|
|
83
|
+
.h\:#{$prefix}-#{$k}-#{$i - 1} {
|
|
84
|
+
&:hover {
|
|
85
|
+
#{$property}: color.mix(black, $v, ($i - 7) * $percentage);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -1,39 +1,53 @@
|
|
|
1
|
-
@use "../breakpoints" as bp;
|
|
2
|
-
@use "sass:map";
|
|
3
|
-
|
|
4
|
-
@mixin create-utilities($map, $prefix, $properties) {
|
|
5
|
-
$function: if(
|
|
6
|
-
map.has-key($map, "property-function"),
|
|
7
|
-
map.get($map, "property-function"),
|
|
8
|
-
null
|
|
9
|
-
);
|
|
10
|
-
|
|
11
|
-
// base styles
|
|
12
|
-
@each $k, $v in map.get($map, "values") {
|
|
13
|
-
.#{$prefix}-#{$k} {
|
|
14
|
-
@each $property in $properties {
|
|
15
|
-
#{$property}: if($function != null, $function + "(" + $v + ")", $v);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
//
|
|
20
|
-
.
|
|
21
|
-
@each $property in $properties {
|
|
22
|
-
#{$property}: if($function != null, $function + "(" + $v + ")", $v);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
1
|
+
@use "../breakpoints" as bp;
|
|
2
|
+
@use "sass:map";
|
|
3
|
+
|
|
4
|
+
@mixin create-utilities($map, $prefix, $properties) {
|
|
5
|
+
$function: if(
|
|
6
|
+
map.has-key($map, "property-function"),
|
|
7
|
+
map.get($map, "property-function"),
|
|
8
|
+
null
|
|
9
|
+
);
|
|
10
|
+
|
|
11
|
+
// base styles
|
|
12
|
+
@each $k, $v in map.get($map, "values") {
|
|
13
|
+
.#{$prefix}-#{$k} {
|
|
14
|
+
@each $property in $properties {
|
|
15
|
+
#{$property}: if($function != null, $function + "(" + $v + ")", $v);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// active styles
|
|
20
|
+
.a\:#{$prefix}-#{$k}:active {
|
|
21
|
+
@each $property in $properties {
|
|
22
|
+
#{$property}: if($function != null, $function + "(" + $v + ")", $v);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// focus styles
|
|
27
|
+
.f\:#{$prefix}-#{$k}:focus {
|
|
28
|
+
@each $property in $properties {
|
|
29
|
+
#{$property}: if($function != null, $function + "(" + $v + ")", $v);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// hover styles
|
|
34
|
+
.h\:#{$prefix}-#{$k}:hover {
|
|
35
|
+
@each $property in $properties {
|
|
36
|
+
#{$property}: if($function != null, $function + "(" + $v + ")", $v);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// responsive styles
|
|
42
|
+
@each $bp, $bp-value in bp.$yma-breakpoints {
|
|
43
|
+
@media (min-width: $bp-value) {
|
|
44
|
+
@each $k, $v in map.get($map, "values") {
|
|
45
|
+
.#{$bp}\:#{$prefix}-#{$k} {
|
|
46
|
+
@each $property in $properties {
|
|
47
|
+
#{$property}: if($function != null, $function + "(" + $v + ")", $v);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
@forward "create-colors";
|
|
2
|
-
@forward "create-utilities";
|
|
3
|
-
@forward "extend-utilities";
|
|
1
|
+
@forward "create-colors";
|
|
2
|
+
@forward "create-utilities";
|
|
@@ -1,231 +1,231 @@
|
|
|
1
|
-
@use "../abstracts/variables" as vars;
|
|
2
|
-
|
|
3
|
-
/** -- Box sizing --
|
|
4
|
-
* 1. Use a more intuitive box-sizing model to make the design consistent.
|
|
5
|
-
* 2. Remove default margin and padding.
|
|
6
|
-
* 3. Reset default border styles.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
*,
|
|
10
|
-
*::before,
|
|
11
|
-
*::after {
|
|
12
|
-
box-sizing: border-box; /* 1 */
|
|
13
|
-
border: 0 solid; /* 3 */
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
* {
|
|
17
|
-
margin: 0; /* 2 */
|
|
18
|
-
padding: 0; /* 2 */
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
/** -- Document --
|
|
22
|
-
* 1. Improve font smoothing.
|
|
23
|
-
* 2. Set a default system font.
|
|
24
|
-
* 3. Add accessible line-height.
|
|
25
|
-
*/
|
|
26
|
-
|
|
27
|
-
body {
|
|
28
|
-
-webkit-font-smoothing: antialiased; /* 1 */
|
|
29
|
-
font-family: vars.$yma-font-system; /* 2 */
|
|
30
|
-
line-height: 1.5; /* 3 */
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/** -- Media Elements --
|
|
34
|
-
* 1. Ensure all media elements like images, videos, and canvases are block-level.
|
|
35
|
-
* 2. Limit their maximum width to the parent container.
|
|
36
|
-
*/
|
|
37
|
-
|
|
38
|
-
canvas,
|
|
39
|
-
img,
|
|
40
|
-
picture,
|
|
41
|
-
svg,
|
|
42
|
-
video {
|
|
43
|
-
display: block; /* 1 */
|
|
44
|
-
max-width: 100%; /* 2 */
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
/** -- Form Elements --
|
|
48
|
-
* 1. Reset background and border styles for form elements.
|
|
49
|
-
* 2. Use `inherit` to ensure font consistency within forms.
|
|
50
|
-
* 3. Add default padding for usability.
|
|
51
|
-
*/
|
|
52
|
-
|
|
53
|
-
button,
|
|
54
|
-
input,
|
|
55
|
-
optgroup,
|
|
56
|
-
select,
|
|
57
|
-
textarea {
|
|
58
|
-
background-color: vars.$yma-color-transparent; /* 1 */
|
|
59
|
-
font-family: inherit; /* 2 */
|
|
60
|
-
padding: 0.5rem; /* 3 */
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Add a default border to form elements that do not have a class attribute.
|
|
65
|
-
*/
|
|
66
|
-
|
|
67
|
-
button:not([class]),
|
|
68
|
-
input:not([class]),
|
|
69
|
-
optgroup:not([class]),
|
|
70
|
-
select:not([class]),
|
|
71
|
-
textarea:not([class]) {
|
|
72
|
-
border: 1px solid vars.$yma-color-silver; /* 1 */
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* Apply consistent focus styles to interactive elements.
|
|
77
|
-
*/
|
|
78
|
-
|
|
79
|
-
a,
|
|
80
|
-
button,
|
|
81
|
-
input,
|
|
82
|
-
select,
|
|
83
|
-
summary,
|
|
84
|
-
textarea {
|
|
85
|
-
&:focus {
|
|
86
|
-
outline: 2px solid vars.$yma-color-transparent;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Set a minimum height for textareas without a defined `rows` attribute.
|
|
92
|
-
*/
|
|
93
|
-
|
|
94
|
-
textarea:not([rows]) {
|
|
95
|
-
min-height: 10em;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Ensure the buttons have a pointer cursor.
|
|
100
|
-
*/
|
|
101
|
-
|
|
102
|
-
button {
|
|
103
|
-
cursor: pointer;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
/** Disabled States
|
|
107
|
-
* 1. Reduce opacity and set a "not-allowed" cursor for disabled elements.
|
|
108
|
-
*/
|
|
109
|
-
|
|
110
|
-
button:disabled,
|
|
111
|
-
input:disabled,
|
|
112
|
-
select:disabled,
|
|
113
|
-
textarea:disabled {
|
|
114
|
-
cursor: not-allowed; /* 1 */
|
|
115
|
-
opacity: 0.5; /* 1 */
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
/** -- Typography --
|
|
119
|
-
* 1. Avoid text overflows.
|
|
120
|
-
* 2. Improve line wrapping for headings.
|
|
121
|
-
* 3. Add a consistent font weight for bold text.
|
|
122
|
-
*/
|
|
123
|
-
|
|
124
|
-
h1,
|
|
125
|
-
h2,
|
|
126
|
-
h3,
|
|
127
|
-
h4,
|
|
128
|
-
h5,
|
|
129
|
-
h6,
|
|
130
|
-
p {
|
|
131
|
-
overflow-wrap: break-word; /* 1 */
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
h1,
|
|
135
|
-
h2,
|
|
136
|
-
h3,
|
|
137
|
-
h4,
|
|
138
|
-
h5,
|
|
139
|
-
h6 {
|
|
140
|
-
font-size: 1rem; /* 3 */
|
|
141
|
-
font-weight: 600; /* 3 */
|
|
142
|
-
text-wrap: balance; /* 2 */
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
p {
|
|
146
|
-
text-wrap: pretty; /* 2 */
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
/**
|
|
150
|
-
* Add the correct font weight in Chrome, Edge, and Safari.
|
|
151
|
-
*/
|
|
152
|
-
|
|
153
|
-
b,
|
|
154
|
-
strong {
|
|
155
|
-
font-weight: 700;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* Add the correct font size in all browsers.
|
|
160
|
-
*/
|
|
161
|
-
|
|
162
|
-
small {
|
|
163
|
-
font-size: 80%;
|
|
164
|
-
line-height: 1.4;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
/**
|
|
168
|
-
* 1. Correct the inheritance and scaling of font size in all browsers.
|
|
169
|
-
* 2. Correct the odd `em` font sizing in all browsers.
|
|
170
|
-
*/
|
|
171
|
-
|
|
172
|
-
pre,
|
|
173
|
-
code,
|
|
174
|
-
kbd,
|
|
175
|
-
samp {
|
|
176
|
-
font-family: monospace, monospace; /* 1 */
|
|
177
|
-
font-size: 1em; /* 2 */
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
/** -- Links --
|
|
181
|
-
* 1. Remove underline styling from links by default.
|
|
182
|
-
* 3. Reset color to inherit from parent element.
|
|
183
|
-
*/
|
|
184
|
-
|
|
185
|
-
a {
|
|
186
|
-
color: inherit; /* 3 */
|
|
187
|
-
text-decoration: none; /* 1 */
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
/** -- Lists --
|
|
191
|
-
* Remove default list styling and padding.
|
|
192
|
-
*/
|
|
193
|
-
|
|
194
|
-
ol,
|
|
195
|
-
ul {
|
|
196
|
-
list-style: none;
|
|
197
|
-
padding: 0;
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
/** -- Tables --
|
|
201
|
-
* 1. Add a consistent font weight for bold text.
|
|
202
|
-
*/
|
|
203
|
-
|
|
204
|
-
th {
|
|
205
|
-
font-size: 1rem; /* 1 */
|
|
206
|
-
font-weight: 600; /* 1 */
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
/** -- Miscellaneous --
|
|
210
|
-
* 1. Add the correct height in Firefox.
|
|
211
|
-
* 2. Correct text decoration.
|
|
212
|
-
* 3. Add spacing around horizontal rules.
|
|
213
|
-
*/
|
|
214
|
-
|
|
215
|
-
hr {
|
|
216
|
-
border-top: 1px solid vars.$yma-color-silver; /* 2 */
|
|
217
|
-
height: 0; /* 1 */
|
|
218
|
-
margin: 1em 0; /* 3 */
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
/**
|
|
222
|
-
* Ensure details and summary elements display correctly.
|
|
223
|
-
*/
|
|
224
|
-
|
|
225
|
-
details {
|
|
226
|
-
display: block;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
summary {
|
|
230
|
-
display: list-item;
|
|
231
|
-
}
|
|
1
|
+
@use "../abstracts/variables" as vars;
|
|
2
|
+
|
|
3
|
+
/** -- Box sizing --
|
|
4
|
+
* 1. Use a more intuitive box-sizing model to make the design consistent.
|
|
5
|
+
* 2. Remove default margin and padding.
|
|
6
|
+
* 3. Reset default border styles.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
*,
|
|
10
|
+
*::before,
|
|
11
|
+
*::after {
|
|
12
|
+
box-sizing: border-box; /* 1 */
|
|
13
|
+
border: 0 solid; /* 3 */
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
* {
|
|
17
|
+
margin: 0; /* 2 */
|
|
18
|
+
padding: 0; /* 2 */
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** -- Document --
|
|
22
|
+
* 1. Improve font smoothing.
|
|
23
|
+
* 2. Set a default system font.
|
|
24
|
+
* 3. Add accessible line-height.
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
body {
|
|
28
|
+
-webkit-font-smoothing: antialiased; /* 1 */
|
|
29
|
+
font-family: vars.$yma-font-system; /* 2 */
|
|
30
|
+
line-height: 1.5; /* 3 */
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** -- Media Elements --
|
|
34
|
+
* 1. Ensure all media elements like images, videos, and canvases are block-level.
|
|
35
|
+
* 2. Limit their maximum width to the parent container.
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
canvas,
|
|
39
|
+
img,
|
|
40
|
+
picture,
|
|
41
|
+
svg,
|
|
42
|
+
video {
|
|
43
|
+
display: block; /* 1 */
|
|
44
|
+
max-width: 100%; /* 2 */
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** -- Form Elements --
|
|
48
|
+
* 1. Reset background and border styles for form elements.
|
|
49
|
+
* 2. Use `inherit` to ensure font consistency within forms.
|
|
50
|
+
* 3. Add default padding for usability.
|
|
51
|
+
*/
|
|
52
|
+
|
|
53
|
+
button,
|
|
54
|
+
input,
|
|
55
|
+
optgroup,
|
|
56
|
+
select,
|
|
57
|
+
textarea {
|
|
58
|
+
background-color: vars.$yma-color-transparent; /* 1 */
|
|
59
|
+
font-family: inherit; /* 2 */
|
|
60
|
+
padding: 0.5rem; /* 3 */
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Add a default border to form elements that do not have a class attribute.
|
|
65
|
+
*/
|
|
66
|
+
|
|
67
|
+
button:not([class]),
|
|
68
|
+
input:not([class]),
|
|
69
|
+
optgroup:not([class]),
|
|
70
|
+
select:not([class]),
|
|
71
|
+
textarea:not([class]) {
|
|
72
|
+
border: 1px solid vars.$yma-color-silver; /* 1 */
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Apply consistent focus styles to interactive elements.
|
|
77
|
+
*/
|
|
78
|
+
|
|
79
|
+
a,
|
|
80
|
+
button,
|
|
81
|
+
input,
|
|
82
|
+
select,
|
|
83
|
+
summary,
|
|
84
|
+
textarea {
|
|
85
|
+
&:focus {
|
|
86
|
+
outline: 2px solid vars.$yma-color-transparent;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Set a minimum height for textareas without a defined `rows` attribute.
|
|
92
|
+
*/
|
|
93
|
+
|
|
94
|
+
textarea:not([rows]) {
|
|
95
|
+
min-height: 10em;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Ensure the buttons have a pointer cursor.
|
|
100
|
+
*/
|
|
101
|
+
|
|
102
|
+
button {
|
|
103
|
+
cursor: pointer;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/** Disabled States
|
|
107
|
+
* 1. Reduce opacity and set a "not-allowed" cursor for disabled elements.
|
|
108
|
+
*/
|
|
109
|
+
|
|
110
|
+
button:disabled,
|
|
111
|
+
input:disabled,
|
|
112
|
+
select:disabled,
|
|
113
|
+
textarea:disabled {
|
|
114
|
+
cursor: not-allowed; /* 1 */
|
|
115
|
+
opacity: 0.5; /* 1 */
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/** -- Typography --
|
|
119
|
+
* 1. Avoid text overflows.
|
|
120
|
+
* 2. Improve line wrapping for headings.
|
|
121
|
+
* 3. Add a consistent font weight for bold text.
|
|
122
|
+
*/
|
|
123
|
+
|
|
124
|
+
h1,
|
|
125
|
+
h2,
|
|
126
|
+
h3,
|
|
127
|
+
h4,
|
|
128
|
+
h5,
|
|
129
|
+
h6,
|
|
130
|
+
p {
|
|
131
|
+
overflow-wrap: break-word; /* 1 */
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
h1,
|
|
135
|
+
h2,
|
|
136
|
+
h3,
|
|
137
|
+
h4,
|
|
138
|
+
h5,
|
|
139
|
+
h6 {
|
|
140
|
+
font-size: 1rem; /* 3 */
|
|
141
|
+
font-weight: 600; /* 3 */
|
|
142
|
+
text-wrap: balance; /* 2 */
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
p {
|
|
146
|
+
text-wrap: pretty; /* 2 */
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Add the correct font weight in Chrome, Edge, and Safari.
|
|
151
|
+
*/
|
|
152
|
+
|
|
153
|
+
b,
|
|
154
|
+
strong {
|
|
155
|
+
font-weight: 700;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Add the correct font size in all browsers.
|
|
160
|
+
*/
|
|
161
|
+
|
|
162
|
+
small {
|
|
163
|
+
font-size: 80%;
|
|
164
|
+
line-height: 1.4;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* 1. Correct the inheritance and scaling of font size in all browsers.
|
|
169
|
+
* 2. Correct the odd `em` font sizing in all browsers.
|
|
170
|
+
*/
|
|
171
|
+
|
|
172
|
+
pre,
|
|
173
|
+
code,
|
|
174
|
+
kbd,
|
|
175
|
+
samp {
|
|
176
|
+
font-family: monospace, monospace; /* 1 */
|
|
177
|
+
font-size: 1em; /* 2 */
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/** -- Links --
|
|
181
|
+
* 1. Remove underline styling from links by default.
|
|
182
|
+
* 3. Reset color to inherit from parent element.
|
|
183
|
+
*/
|
|
184
|
+
|
|
185
|
+
a {
|
|
186
|
+
color: inherit; /* 3 */
|
|
187
|
+
text-decoration: none; /* 1 */
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/** -- Lists --
|
|
191
|
+
* Remove default list styling and padding.
|
|
192
|
+
*/
|
|
193
|
+
|
|
194
|
+
ol,
|
|
195
|
+
ul {
|
|
196
|
+
list-style: none;
|
|
197
|
+
padding: 0;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/** -- Tables --
|
|
201
|
+
* 1. Add a consistent font weight for bold text.
|
|
202
|
+
*/
|
|
203
|
+
|
|
204
|
+
th {
|
|
205
|
+
font-size: 1rem; /* 1 */
|
|
206
|
+
font-weight: 600; /* 1 */
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/** -- Miscellaneous --
|
|
210
|
+
* 1. Add the correct height in Firefox.
|
|
211
|
+
* 2. Correct text decoration.
|
|
212
|
+
* 3. Add spacing around horizontal rules.
|
|
213
|
+
*/
|
|
214
|
+
|
|
215
|
+
hr {
|
|
216
|
+
border-top: 1px solid vars.$yma-color-silver; /* 2 */
|
|
217
|
+
height: 0; /* 1 */
|
|
218
|
+
margin: 1em 0; /* 3 */
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* Ensure details and summary elements display correctly.
|
|
223
|
+
*/
|
|
224
|
+
|
|
225
|
+
details {
|
|
226
|
+
display: block;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
summary {
|
|
230
|
+
display: list-item;
|
|
231
|
+
}
|