@primer/css 20.7.0-rc.5025a8f3 → 20.7.0-rc.b85cd3b0
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 +2 -0
- package/base/base.scss +2 -2
- package/dist/actionlist.css +1 -1
- package/dist/actionlist.css.map +1 -1
- package/dist/alerts.css +1 -1
- package/dist/alerts.css.map +1 -1
- package/dist/autocomplete.css +1 -1
- package/dist/autocomplete.css.map +1 -1
- package/dist/avatars.css.map +1 -1
- package/dist/base.css +1 -1
- package/dist/base.css.map +1 -1
- package/dist/blankslate.css.map +1 -1
- package/dist/box.css +1 -1
- package/dist/box.css.map +1 -1
- package/dist/branch-name.css.map +1 -1
- package/dist/breadcrumb.css.map +1 -1
- package/dist/buttons.css +1 -1
- package/dist/buttons.css.map +1 -1
- package/dist/color-modes.css.map +1 -1
- package/dist/core.css +1 -1
- package/dist/core.css.map +1 -1
- package/dist/dropdown.css.map +1 -1
- package/dist/forms.css +1 -1
- package/dist/forms.css.map +1 -1
- package/dist/header.css +1 -1
- package/dist/header.css.map +1 -1
- package/dist/labels.css +1 -1
- package/dist/labels.css.map +1 -1
- package/dist/layout.css.map +1 -1
- package/dist/links.css.map +1 -1
- package/dist/loaders.css.map +1 -1
- package/dist/markdown.css +1 -1
- package/dist/markdown.css.map +1 -1
- package/dist/marketing-buttons.css +1 -1
- package/dist/marketing-buttons.css.map +1 -1
- package/dist/marketing-links.css.map +1 -1
- package/dist/marketing-type.css +1 -1
- package/dist/marketing-type.css.map +1 -1
- package/dist/marketing-utilities.css.map +1 -1
- package/dist/marketing.css +1 -1
- package/dist/marketing.css.map +1 -1
- package/dist/meta.json +64 -64
- package/dist/navigation.css +1 -1
- package/dist/navigation.css.map +1 -1
- package/dist/overlay.css +1 -1
- package/dist/overlay.css.map +1 -1
- package/dist/pagination.css.map +1 -1
- package/dist/popover.css.map +1 -1
- package/dist/primer.css +3 -3
- package/dist/primer.css.map +1 -1
- package/dist/primitives.css +1 -1
- package/dist/primitives.css.map +1 -1
- package/dist/product.css +1 -1
- package/dist/product.css.map +1 -1
- package/dist/progress.css.map +1 -1
- package/dist/select-menu.css +1 -1
- package/dist/select-menu.css.map +1 -1
- package/dist/subhead.css +1 -1
- package/dist/subhead.css.map +1 -1
- package/dist/timeline.css.map +1 -1
- package/dist/toasts.css.map +1 -1
- package/dist/toggle-switch.css.map +1 -1
- package/dist/tooltips.css.map +1 -1
- package/dist/truncate.css.map +1 -1
- package/dist/utilities.css +1 -1
- package/dist/utilities.css.map +1 -1
- package/dist/variables.json +27 -17
- package/package.json +1 -1
- package/primitives/index.scss +1 -0
- package/primitives/temp-typography-tokens.scss +22 -0
- package/support/mixins/typography.scss +18 -12
- package/support/variables/misc.scss +1 -0
- package/support/variables/typography.scss +4 -4
- package/utilities/borders.scss +18 -19
- package/utilities/padding.scss +9 -9
- package/utilities/typography.scss +152 -70
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// stylelint-disable comment-empty-line-before
|
|
1
|
+
// stylelint-disable comment-empty-line-before, primer/typography
|
|
2
2
|
|
|
3
3
|
// Type scale variables found in ../support/lib/variables.scss
|
|
4
4
|
// $h00-size-mobile: 40px;
|
|
@@ -17,40 +17,47 @@
|
|
|
17
17
|
|
|
18
18
|
/* Set the font size to 26px */
|
|
19
19
|
.h1 {
|
|
20
|
-
|
|
21
|
-
font-size: $h1-size-mobile !important;
|
|
20
|
+
font-size: var(--h1-size-mobile, $h1-size-mobile) !important;
|
|
22
21
|
|
|
23
|
-
@include breakpoint(md) {
|
|
22
|
+
@include breakpoint(md) {
|
|
23
|
+
font-size: var(--h1-size, $h1-size) !important;
|
|
24
|
+
}
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
/* Set the font size to 22px */
|
|
27
28
|
.h2 {
|
|
28
|
-
|
|
29
|
-
font-size: $h2-size-mobile !important;
|
|
29
|
+
font-size: var(--h2-size-mobile, $h2-size-mobile) !important;
|
|
30
30
|
|
|
31
|
-
@include breakpoint(md) {
|
|
31
|
+
@include breakpoint(md) {
|
|
32
|
+
font-size: var(--h2-size, $h2-size) !important;
|
|
33
|
+
}
|
|
32
34
|
}
|
|
33
35
|
|
|
34
36
|
/* Set the font size to 18px */
|
|
35
37
|
.h3 {
|
|
36
|
-
|
|
37
|
-
font-size: $h3-size-mobile !important;
|
|
38
|
+
font-size: var(--h3-size-mobile, $h3-size-mobile) !important;
|
|
38
39
|
|
|
39
|
-
@include breakpoint(md) {
|
|
40
|
+
@include breakpoint(md) {
|
|
41
|
+
font-size: var(--h3-size, $h3-size) !important;
|
|
42
|
+
}
|
|
40
43
|
}
|
|
41
44
|
|
|
42
45
|
/* Set the font size to #{$h4-size} */
|
|
43
46
|
.h4 {
|
|
44
|
-
font-size: $h4-size !important;
|
|
47
|
+
font-size: var(--h4-size, $h4-size) !important;
|
|
45
48
|
}
|
|
46
49
|
|
|
47
50
|
/* Set the font size to #{$h5-size} */
|
|
48
|
-
.h5 {
|
|
51
|
+
.h5 {
|
|
52
|
+
font-size: var(--h5-size, $h5-size) !important;
|
|
53
|
+
}
|
|
49
54
|
|
|
50
55
|
// Does not include color property like typography base
|
|
51
56
|
// styles, color should be applied with color utilities.
|
|
52
57
|
/* Set the font size to #{$h6-size} */
|
|
53
|
-
.h6 {
|
|
58
|
+
.h6 {
|
|
59
|
+
font-size: var(--h6-size, $h6-size) !important;
|
|
60
|
+
}
|
|
54
61
|
|
|
55
62
|
// Heading utilities
|
|
56
63
|
.h1,
|
|
@@ -58,102 +65,123 @@
|
|
|
58
65
|
.h3,
|
|
59
66
|
.h4,
|
|
60
67
|
.h5,
|
|
61
|
-
.h6 {
|
|
68
|
+
.h6 {
|
|
69
|
+
font-weight: var(--base-text-weight-semibold, $font-weight-bold) !important;
|
|
70
|
+
}
|
|
62
71
|
|
|
63
72
|
// Type utilities that match type sale
|
|
64
73
|
/* Set the font size to 26px */
|
|
65
74
|
.f1 {
|
|
66
|
-
|
|
67
|
-
font-size: $h1-size-mobile !important;
|
|
75
|
+
font-size: var(--h1-size-mobile, $h1-size-mobile) !important;
|
|
68
76
|
|
|
69
|
-
@include breakpoint(md) {
|
|
77
|
+
@include breakpoint(md) {
|
|
78
|
+
font-size: var(--h1-size, $h1-size) !important;
|
|
79
|
+
}
|
|
70
80
|
}
|
|
71
81
|
|
|
72
82
|
/* Set the font size to 22px */
|
|
73
83
|
.f2 {
|
|
74
|
-
|
|
75
|
-
font-size: $h2-size-mobile !important;
|
|
84
|
+
font-size: var(--h2-size-mobile, $h2-size-mobile) !important;
|
|
76
85
|
|
|
77
|
-
@include breakpoint(md) {
|
|
86
|
+
@include breakpoint(md) {
|
|
87
|
+
font-size: var(--h2-size, $h2-size) !important;
|
|
88
|
+
}
|
|
78
89
|
}
|
|
79
90
|
|
|
80
91
|
/* Set the font size to 18px */
|
|
81
92
|
.f3 {
|
|
82
|
-
|
|
83
|
-
font-size: $h3-size-mobile !important;
|
|
93
|
+
font-size: var(--h3-size-mobile, $h3-size-mobile) !important;
|
|
84
94
|
|
|
85
|
-
@include breakpoint(md) {
|
|
95
|
+
@include breakpoint(md) {
|
|
96
|
+
font-size: var(--h3-size, $h3-size) !important;
|
|
97
|
+
}
|
|
86
98
|
}
|
|
87
99
|
|
|
88
100
|
/* Set the font size to #{$h4-size} */
|
|
89
101
|
.f4 {
|
|
90
|
-
font-size: $h4-size !important;
|
|
102
|
+
font-size: var(--h4-size, $h4-size) !important;
|
|
91
103
|
|
|
92
|
-
@include breakpoint(md) {
|
|
104
|
+
@include breakpoint(md) {
|
|
105
|
+
font-size: var(--h4-size, $h4-size) !important;
|
|
106
|
+
}
|
|
93
107
|
}
|
|
94
108
|
|
|
95
109
|
/* Set the font size to #{$h5-size} */
|
|
96
|
-
.f5 {
|
|
110
|
+
.f5 {
|
|
111
|
+
font-size: var(--h5-size, $h5-size) !important;
|
|
112
|
+
}
|
|
113
|
+
|
|
97
114
|
/* Set the font size to #{$h6-size} */
|
|
98
|
-
.f6 {
|
|
115
|
+
.f6 {
|
|
116
|
+
font-size: var(--h6-size, $h6-size) !important;
|
|
117
|
+
}
|
|
99
118
|
|
|
100
119
|
// Type utils with light weight that match type scale
|
|
101
120
|
/* Set the font size to 40px and weight to light */
|
|
102
121
|
.f00-light {
|
|
103
|
-
|
|
104
|
-
font-
|
|
105
|
-
font-weight: $font-weight-light !important;
|
|
122
|
+
font-size: var(--h00-size-mobile, $h00-size-mobile) !important;
|
|
123
|
+
font-weight: var(--base-text-weight-light, $font-weight-light) !important;
|
|
106
124
|
|
|
107
|
-
@include breakpoint(md) {
|
|
125
|
+
@include breakpoint(md) {
|
|
126
|
+
font-size: var(--h00-size, $h00-size) !important;
|
|
127
|
+
}
|
|
108
128
|
}
|
|
109
129
|
|
|
110
130
|
/* Set the font size to 32px and weight to light */
|
|
111
131
|
.f0-light {
|
|
112
|
-
|
|
113
|
-
font-
|
|
114
|
-
font-weight: $font-weight-light !important;
|
|
132
|
+
font-size: var(--h0-size-mobile, $h0-size-mobile) !important;
|
|
133
|
+
font-weight: var(--base-text-weight-light, $font-weight-light) !important;
|
|
115
134
|
|
|
116
|
-
@include breakpoint(md) {
|
|
135
|
+
@include breakpoint(md) {
|
|
136
|
+
font-size: var(--h0-size, $h0-size) !important;
|
|
137
|
+
}
|
|
117
138
|
}
|
|
118
139
|
|
|
119
140
|
/* Set the font size to 26px and weight to light */
|
|
120
141
|
.f1-light {
|
|
121
|
-
|
|
122
|
-
font-
|
|
123
|
-
font-weight: $font-weight-light !important;
|
|
142
|
+
font-size: var(--h1-size-mobile, $h1-size-mobile) !important;
|
|
143
|
+
font-weight: var(--base-text-weight-light, $font-weight-light) !important;
|
|
124
144
|
|
|
125
|
-
@include breakpoint(md) {
|
|
145
|
+
@include breakpoint(md) {
|
|
146
|
+
font-size: var(--h1-size, $h1-size) !important;
|
|
147
|
+
}
|
|
126
148
|
}
|
|
127
149
|
|
|
128
150
|
/* Set the font size to 22px and weight to light */
|
|
129
151
|
.f2-light {
|
|
130
|
-
|
|
131
|
-
font-
|
|
132
|
-
font-weight: $font-weight-light !important;
|
|
152
|
+
font-size: var(--h2-size-mobile, $h2-size-mobile) !important;
|
|
153
|
+
font-weight: var(--base-text-weight-light, $font-weight-light) !important;
|
|
133
154
|
|
|
134
|
-
@include breakpoint(md) {
|
|
155
|
+
@include breakpoint(md) {
|
|
156
|
+
font-size: var(--h2-size, $h2-size) !important;
|
|
157
|
+
}
|
|
135
158
|
}
|
|
136
159
|
|
|
137
160
|
// Same size and weight as .lead but without color property
|
|
138
161
|
/* Set the font size to 18px and weight to light */
|
|
139
162
|
.f3-light {
|
|
140
|
-
|
|
141
|
-
font-
|
|
142
|
-
font-weight: $font-weight-light !important;
|
|
163
|
+
font-size: var(--h3-size-mobile, $h3-size-mobile) !important;
|
|
164
|
+
font-weight: var(--base-text-weight-light, $font-weight-light) !important;
|
|
143
165
|
|
|
144
|
-
@include breakpoint(md) {
|
|
166
|
+
@include breakpoint(md) {
|
|
167
|
+
font-size: var(--h3-size, $h3-size) !important;
|
|
168
|
+
}
|
|
145
169
|
}
|
|
146
170
|
|
|
147
171
|
// Smallest text size
|
|
148
172
|
/* Set the font size to ${#h6-size} */
|
|
149
|
-
.text-small {
|
|
173
|
+
.text-small {
|
|
174
|
+
font-size: var(--h6-size, $h6-size) !important;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// 12px
|
|
150
178
|
|
|
151
179
|
/* Large leading paragraphs */
|
|
152
180
|
.lead {
|
|
153
181
|
// stylelint-disable-next-line primer/spacing
|
|
154
182
|
margin-bottom: 30px;
|
|
155
|
-
font-size: $h3-size;
|
|
156
|
-
font-weight: $font-weight-light;
|
|
183
|
+
font-size: var(--h3-size, $h3-size);
|
|
184
|
+
font-weight: var(--base-text-weight-light, $font-weight-light);
|
|
157
185
|
}
|
|
158
186
|
|
|
159
187
|
// Line-height variations
|
|
@@ -163,14 +191,26 @@
|
|
|
163
191
|
// Responsive line-height
|
|
164
192
|
@each $breakpoint, $variant in $responsive-variants {
|
|
165
193
|
@include breakpoint($breakpoint) {
|
|
194
|
+
|
|
166
195
|
/* Set the line height to ultra condensed */
|
|
167
|
-
.lh#{$variant}-condensed-ultra {
|
|
196
|
+
.lh#{$variant}-condensed-ultra {
|
|
197
|
+
line-height: $lh-condensed-ultra !important;
|
|
198
|
+
}
|
|
199
|
+
|
|
168
200
|
/* Set the line height to condensed */
|
|
169
|
-
.lh#{$variant}-condensed {
|
|
201
|
+
.lh#{$variant}-condensed {
|
|
202
|
+
line-height: $lh-condensed !important;
|
|
203
|
+
}
|
|
204
|
+
|
|
170
205
|
/* Set the line height to default */
|
|
171
|
-
.lh#{$variant}-default {
|
|
206
|
+
.lh#{$variant}-default {
|
|
207
|
+
line-height: $lh-default !important;
|
|
208
|
+
}
|
|
209
|
+
|
|
172
210
|
/* Set the line height to zero */
|
|
173
|
-
.lh#{$variant}-0 {
|
|
211
|
+
.lh#{$variant}-0 {
|
|
212
|
+
line-height: 0 !important;
|
|
213
|
+
}
|
|
174
214
|
}
|
|
175
215
|
}
|
|
176
216
|
|
|
@@ -178,34 +218,72 @@
|
|
|
178
218
|
// Responsive text alignment
|
|
179
219
|
@each $breakpoint, $variant in $responsive-variants {
|
|
180
220
|
@include breakpoint($breakpoint) {
|
|
221
|
+
|
|
181
222
|
/* Text align to the right */
|
|
182
|
-
.text#{$variant}-right {
|
|
223
|
+
.text#{$variant}-right {
|
|
224
|
+
text-align: right !important;
|
|
225
|
+
}
|
|
226
|
+
|
|
183
227
|
/* Text align to the left */
|
|
184
|
-
.text#{$variant}-left {
|
|
228
|
+
.text#{$variant}-left {
|
|
229
|
+
text-align: left !important;
|
|
230
|
+
}
|
|
231
|
+
|
|
185
232
|
/* Text align to the center */
|
|
186
|
-
.text#{$variant}-center {
|
|
233
|
+
.text#{$variant}-center {
|
|
234
|
+
text-align: center !important;
|
|
235
|
+
}
|
|
187
236
|
}
|
|
188
237
|
}
|
|
189
238
|
|
|
190
239
|
// Text styles
|
|
191
240
|
/* Set the font weight to normal */
|
|
192
|
-
.text-normal {
|
|
241
|
+
.text-normal {
|
|
242
|
+
font-weight: $font-weight-normal !important;
|
|
243
|
+
}
|
|
244
|
+
|
|
193
245
|
/* Set the font weight to bold */
|
|
194
|
-
.text-bold {
|
|
195
|
-
|
|
196
|
-
|
|
246
|
+
.text-bold {
|
|
247
|
+
font-weight: $font-weight-bold !important;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.text-semibold {
|
|
251
|
+
font-weight: $font-weight-semibold !important;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.text-light {
|
|
255
|
+
font-weight: $font-weight-light !important;
|
|
256
|
+
}
|
|
257
|
+
|
|
197
258
|
/* Set the font to italic */
|
|
198
|
-
.text-italic {
|
|
259
|
+
.text-italic {
|
|
260
|
+
font-style: italic !important;
|
|
261
|
+
}
|
|
262
|
+
|
|
199
263
|
/* Make text uppercase */
|
|
200
|
-
.text-uppercase {
|
|
264
|
+
.text-uppercase {
|
|
265
|
+
text-transform: uppercase !important;
|
|
266
|
+
}
|
|
267
|
+
|
|
201
268
|
/* Underline text */
|
|
202
|
-
.text-underline {
|
|
269
|
+
.text-underline {
|
|
270
|
+
text-decoration: underline !important;
|
|
271
|
+
}
|
|
272
|
+
|
|
203
273
|
/* Don't underline text */
|
|
204
|
-
.no-underline {
|
|
274
|
+
.no-underline {
|
|
275
|
+
text-decoration: none !important;
|
|
276
|
+
}
|
|
277
|
+
|
|
205
278
|
/* Don't wrap white space */
|
|
206
|
-
.no-wrap {
|
|
279
|
+
.no-wrap {
|
|
280
|
+
white-space: nowrap !important;
|
|
281
|
+
}
|
|
282
|
+
|
|
207
283
|
/* Normal white space */
|
|
208
|
-
.ws-normal {
|
|
284
|
+
.ws-normal {
|
|
285
|
+
white-space: normal !important;
|
|
286
|
+
}
|
|
209
287
|
|
|
210
288
|
/* Force long "words" to wrap if they exceed the width of the container */
|
|
211
289
|
.wb-break-word {
|
|
@@ -225,14 +303,18 @@
|
|
|
225
303
|
*
|
|
226
304
|
* see: https://developer.mozilla.org/en-US/docs/Web/CSS/word-break#Values
|
|
227
305
|
*/
|
|
228
|
-
.wb-break-all {
|
|
306
|
+
.wb-break-all {
|
|
307
|
+
word-break: break-all !important;
|
|
308
|
+
}
|
|
229
309
|
|
|
230
310
|
.text-emphasized {
|
|
231
|
-
font-weight: $font-weight-bold;
|
|
311
|
+
font-weight: var(--base-text-weight-semibold, $font-weight-bold);
|
|
232
312
|
}
|
|
233
313
|
|
|
234
314
|
// List styles
|
|
235
|
-
.list-style-none {
|
|
315
|
+
.list-style-none {
|
|
316
|
+
list-style: none !important;
|
|
317
|
+
}
|
|
236
318
|
|
|
237
319
|
/* Set to monospace font */
|
|
238
320
|
.text-mono {
|