@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.
Files changed (76) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/base/base.scss +2 -2
  3. package/dist/actionlist.css +1 -1
  4. package/dist/actionlist.css.map +1 -1
  5. package/dist/alerts.css +1 -1
  6. package/dist/alerts.css.map +1 -1
  7. package/dist/autocomplete.css +1 -1
  8. package/dist/autocomplete.css.map +1 -1
  9. package/dist/avatars.css.map +1 -1
  10. package/dist/base.css +1 -1
  11. package/dist/base.css.map +1 -1
  12. package/dist/blankslate.css.map +1 -1
  13. package/dist/box.css +1 -1
  14. package/dist/box.css.map +1 -1
  15. package/dist/branch-name.css.map +1 -1
  16. package/dist/breadcrumb.css.map +1 -1
  17. package/dist/buttons.css +1 -1
  18. package/dist/buttons.css.map +1 -1
  19. package/dist/color-modes.css.map +1 -1
  20. package/dist/core.css +1 -1
  21. package/dist/core.css.map +1 -1
  22. package/dist/dropdown.css.map +1 -1
  23. package/dist/forms.css +1 -1
  24. package/dist/forms.css.map +1 -1
  25. package/dist/header.css +1 -1
  26. package/dist/header.css.map +1 -1
  27. package/dist/labels.css +1 -1
  28. package/dist/labels.css.map +1 -1
  29. package/dist/layout.css.map +1 -1
  30. package/dist/links.css.map +1 -1
  31. package/dist/loaders.css.map +1 -1
  32. package/dist/markdown.css +1 -1
  33. package/dist/markdown.css.map +1 -1
  34. package/dist/marketing-buttons.css +1 -1
  35. package/dist/marketing-buttons.css.map +1 -1
  36. package/dist/marketing-links.css.map +1 -1
  37. package/dist/marketing-type.css +1 -1
  38. package/dist/marketing-type.css.map +1 -1
  39. package/dist/marketing-utilities.css.map +1 -1
  40. package/dist/marketing.css +1 -1
  41. package/dist/marketing.css.map +1 -1
  42. package/dist/meta.json +64 -64
  43. package/dist/navigation.css +1 -1
  44. package/dist/navigation.css.map +1 -1
  45. package/dist/overlay.css +1 -1
  46. package/dist/overlay.css.map +1 -1
  47. package/dist/pagination.css.map +1 -1
  48. package/dist/popover.css.map +1 -1
  49. package/dist/primer.css +3 -3
  50. package/dist/primer.css.map +1 -1
  51. package/dist/primitives.css +1 -1
  52. package/dist/primitives.css.map +1 -1
  53. package/dist/product.css +1 -1
  54. package/dist/product.css.map +1 -1
  55. package/dist/progress.css.map +1 -1
  56. package/dist/select-menu.css +1 -1
  57. package/dist/select-menu.css.map +1 -1
  58. package/dist/subhead.css +1 -1
  59. package/dist/subhead.css.map +1 -1
  60. package/dist/timeline.css.map +1 -1
  61. package/dist/toasts.css.map +1 -1
  62. package/dist/toggle-switch.css.map +1 -1
  63. package/dist/tooltips.css.map +1 -1
  64. package/dist/truncate.css.map +1 -1
  65. package/dist/utilities.css +1 -1
  66. package/dist/utilities.css.map +1 -1
  67. package/dist/variables.json +27 -17
  68. package/package.json +1 -1
  69. package/primitives/index.scss +1 -0
  70. package/primitives/temp-typography-tokens.scss +22 -0
  71. package/support/mixins/typography.scss +18 -12
  72. package/support/variables/misc.scss +1 -0
  73. package/support/variables/typography.scss +4 -4
  74. package/utilities/borders.scss +18 -19
  75. package/utilities/padding.scss +9 -9
  76. 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
- // stylelint-disable-next-line primer/typography
21
- font-size: $h1-size-mobile !important;
20
+ font-size: var(--h1-size-mobile, $h1-size-mobile) !important;
22
21
 
23
- @include breakpoint(md) { font-size: $h1-size !important; }
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
- // stylelint-disable-next-line primer/typography
29
- font-size: $h2-size-mobile !important;
29
+ font-size: var(--h2-size-mobile, $h2-size-mobile) !important;
30
30
 
31
- @include breakpoint(md) { font-size: $h2-size !important; }
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
- // stylelint-disable-next-line primer/typography
37
- font-size: $h3-size-mobile !important;
38
+ font-size: var(--h3-size-mobile, $h3-size-mobile) !important;
38
39
 
39
- @include breakpoint(md) { font-size: $h3-size !important; }
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 { font-size: $h5-size !important; }
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 { font-size: $h6-size !important; }
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 { font-weight: $font-weight-bold !important; }
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
- // stylelint-disable-next-line primer/typography
67
- font-size: $h1-size-mobile !important;
75
+ font-size: var(--h1-size-mobile, $h1-size-mobile) !important;
68
76
 
69
- @include breakpoint(md) { font-size: $h1-size !important; }
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
- // stylelint-disable-next-line primer/typography
75
- font-size: $h2-size-mobile !important;
84
+ font-size: var(--h2-size-mobile, $h2-size-mobile) !important;
76
85
 
77
- @include breakpoint(md) { font-size: $h2-size !important; }
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
- // stylelint-disable-next-line primer/typography
83
- font-size: $h3-size-mobile !important;
93
+ font-size: var(--h3-size-mobile, $h3-size-mobile) !important;
84
94
 
85
- @include breakpoint(md) { font-size: $h3-size !important; }
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) { font-size: $h4-size !important; }
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 { font-size: $h5-size !important; }
110
+ .f5 {
111
+ font-size: var(--h5-size, $h5-size) !important;
112
+ }
113
+
97
114
  /* Set the font size to #{$h6-size} */
98
- .f6 { font-size: $h6-size !important; }
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
- // stylelint-disable-next-line primer/typography
104
- font-size: $h00-size-mobile !important;
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) { font-size: $h00-size !important; }
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
- // stylelint-disable-next-line primer/typography
113
- font-size: $h0-size-mobile !important;
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) { font-size: $h0-size !important; }
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
- // stylelint-disable-next-line primer/typography
122
- font-size: $h1-size-mobile !important;
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) { font-size: $h1-size !important; }
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
- // stylelint-disable-next-line primer/typography
131
- font-size: $h2-size-mobile !important;
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) { font-size: $h2-size !important; }
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
- // stylelint-disable-next-line primer/typography
141
- font-size: $h3-size-mobile !important;
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) { font-size: $h3-size !important; }
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 { font-size: $h6-size !important; } // 12px
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 { line-height: $lh-condensed-ultra !important; }
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 { line-height: $lh-condensed !important; }
201
+ .lh#{$variant}-condensed {
202
+ line-height: $lh-condensed !important;
203
+ }
204
+
170
205
  /* Set the line height to default */
171
- .lh#{$variant}-default { line-height: $lh-default !important; }
206
+ .lh#{$variant}-default {
207
+ line-height: $lh-default !important;
208
+ }
209
+
172
210
  /* Set the line height to zero */
173
- .lh#{$variant}-0 { line-height: 0 !important; }
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 { text-align: right !important; }
223
+ .text#{$variant}-right {
224
+ text-align: right !important;
225
+ }
226
+
183
227
  /* Text align to the left */
184
- .text#{$variant}-left { text-align: left !important; }
228
+ .text#{$variant}-left {
229
+ text-align: left !important;
230
+ }
231
+
185
232
  /* Text align to the center */
186
- .text#{$variant}-center { text-align: center !important; }
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 { font-weight: $font-weight-normal !important; }
241
+ .text-normal {
242
+ font-weight: $font-weight-normal !important;
243
+ }
244
+
193
245
  /* Set the font weight to bold */
194
- .text-bold { font-weight: $font-weight-bold !important; }
195
- .text-semibold { font-weight: $font-weight-semibold !important; }
196
- .text-light { font-weight: $font-weight-light !important; }
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 { font-style: italic !important; }
259
+ .text-italic {
260
+ font-style: italic !important;
261
+ }
262
+
199
263
  /* Make text uppercase */
200
- .text-uppercase { text-transform: uppercase !important; }
264
+ .text-uppercase {
265
+ text-transform: uppercase !important;
266
+ }
267
+
201
268
  /* Underline text */
202
- .text-underline { text-decoration: underline !important; }
269
+ .text-underline {
270
+ text-decoration: underline !important;
271
+ }
272
+
203
273
  /* Don't underline text */
204
- .no-underline { text-decoration: none !important; }
274
+ .no-underline {
275
+ text-decoration: none !important;
276
+ }
277
+
205
278
  /* Don't wrap white space */
206
- .no-wrap { white-space: nowrap !important; }
279
+ .no-wrap {
280
+ white-space: nowrap !important;
281
+ }
282
+
207
283
  /* Normal white space */
208
- .ws-normal { white-space: normal !important; }
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 { word-break: break-all !important; }
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 { list-style: none !important; }
315
+ .list-style-none {
316
+ list-style: none !important;
317
+ }
236
318
 
237
319
  /* Set to monospace font */
238
320
  .text-mono {