@primer/css 21.0.7 → 21.0.8-rc.137251d9
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 +6 -0
- package/dist/color-modes.css +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/forms.css +1 -1
- package/dist/forms.css.map +1 -1
- package/dist/meta.json +64 -64
- package/dist/primer.css +2 -2
- package/dist/primer.css.map +1 -1
- package/dist/primitives.css +1 -1
- package/dist/primitives.css.map +1 -1
- package/dist/stats/color-modes.json +1 -1
- package/dist/stats/core.json +1 -1
- package/dist/stats/forms.json +1 -1
- package/dist/stats/primer.json +1 -1
- package/migrations/v16.md +300 -0
- package/migrations/v18.md +80 -0
- package/package.json +35 -35
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
Primer v16.0.0 introduces the idea of _color modes_ and _functional variables_. A color mode defines a set of colors in the Primer system that differs from that of other color modes. Currently, Primer ships with a light mode and a dark mode.
|
|
2
|
+
|
|
3
|
+
Because colors differ in each color mode, it doesn't make sense to try to make an element a specific color; instead, Primer now applies colors based on the function of an element using functional variables. As a result, the Sass color variables that existed in Primer prior to version 16.0.0 have been replaced with functional CSS variables. These variables have different values depending on the current color mode. For a list of the new functional CSS color variables, see [the color system page](/support/color-system). The color utility classes have also been updated to match; see [the color utilities page](/utilities/colors) for more information.
|
|
4
|
+
|
|
5
|
+
## Components
|
|
6
|
+
|
|
7
|
+
Most components don't need to be updated and should work without making changes. However some components that use presentational class names now use functional class names.
|
|
8
|
+
|
|
9
|
+
### Buttons
|
|
10
|
+
|
|
11
|
+
| `v15` | `v16` |
|
|
12
|
+
| ----------- | ----- |
|
|
13
|
+
| `.btn-blue` | n/a |
|
|
14
|
+
|
|
15
|
+
### Counters
|
|
16
|
+
|
|
17
|
+
| [`v15`](https://primer.style/css/components/labels#counters) | `v16` |
|
|
18
|
+
| ------------------------------------------------------------ | --------------------- |
|
|
19
|
+
| `.Counter--gray` | `.Counter--primary` |
|
|
20
|
+
| `.Counter--gray-light` | `.Counter--secondary` |
|
|
21
|
+
|
|
22
|
+
### Dropdown
|
|
23
|
+
|
|
24
|
+
| [`v15`](https://primer.style/css/components/dropdown#dark) | `v16` |
|
|
25
|
+
| ---------------------------------------------------------- | ----- |
|
|
26
|
+
| `.dropdown-menu-dark` | n/a |
|
|
27
|
+
|
|
28
|
+
### Labels
|
|
29
|
+
|
|
30
|
+
| [`v15`](https://primer.style/css/components/labels) | `v16` |
|
|
31
|
+
| --------------------------------------------------- | ------------------- |
|
|
32
|
+
| `.Label--gray-darker` | `.Label--primary` |
|
|
33
|
+
| `.Label--gray` | `.Label--secondary` |
|
|
34
|
+
| `.Label--blue` | `.Label--info` |
|
|
35
|
+
| `.Label--green` | `.Label--success` |
|
|
36
|
+
| `.Label--yellow` | `.Label--warning` |
|
|
37
|
+
| `.Label--red` | `.Label--danger` |
|
|
38
|
+
| `.Label--orange` | n/a |
|
|
39
|
+
| `.Label--purple` | n/a |
|
|
40
|
+
| `.Label--pink` | n/a |
|
|
41
|
+
|
|
42
|
+
### States
|
|
43
|
+
|
|
44
|
+
| [`v15`](https://primer.style/css/components/labels#states) | `v16` |
|
|
45
|
+
| ---------------------------------------------------------- | ---------------- |
|
|
46
|
+
| n/a | `.State--draft` |
|
|
47
|
+
| `.State--green` | `.State--open` |
|
|
48
|
+
| `.State--purple` | `.State--merged` |
|
|
49
|
+
| `.State--red` | `.State--closed` |
|
|
50
|
+
|
|
51
|
+
## Utility classes
|
|
52
|
+
|
|
53
|
+
See [color utility classes](/utilities/colors) for a list of all the functional color utility classes.
|
|
54
|
+
|
|
55
|
+
### Text
|
|
56
|
+
|
|
57
|
+
| [`v15`](https://primer.style/css/utilities/colors#text-color-utilities) | `v16` |
|
|
58
|
+
| ----------------------------------------------------------------------- | ----------------------- |
|
|
59
|
+
| `.text-gray-dark` | `.color-text-primary` |
|
|
60
|
+
| `.text-gray` | `.color-text-secondary` |
|
|
61
|
+
| `.text-gray-light` | `.color-text-tertiary` |
|
|
62
|
+
| `.text-blue` | `.color-text-link` |
|
|
63
|
+
| `.text-green` | `.color-text-success` |
|
|
64
|
+
| `.text-yellow` | `.color-text-warning` |
|
|
65
|
+
| `.text-red` | `.color-text-danger` |
|
|
66
|
+
| `.text-white` | `.color-text-white` |
|
|
67
|
+
| n/a | `.color-text-inverse` |
|
|
68
|
+
| `.text-black` | n/a |
|
|
69
|
+
| `.text-orange` | n/a |
|
|
70
|
+
| `.text-orange-light` | n/a |
|
|
71
|
+
| `.text-purple` | n/a |
|
|
72
|
+
| `.text-pink` | n/a |
|
|
73
|
+
|
|
74
|
+
### Icon
|
|
75
|
+
|
|
76
|
+
| `v15` | `v16` |
|
|
77
|
+
| ----- | ----------------------- |
|
|
78
|
+
| n/a | `.color-icon-primary` |
|
|
79
|
+
| n/a | `.color-icon-secondary` |
|
|
80
|
+
| n/a | `.color-icon-tertiary` |
|
|
81
|
+
| n/a | `.color-icon-info` |
|
|
82
|
+
| n/a | `.color-icon-success` |
|
|
83
|
+
| n/a | `.color-icon-warning` |
|
|
84
|
+
| n/a | `.color-icon-danger` |
|
|
85
|
+
|
|
86
|
+
### Border
|
|
87
|
+
|
|
88
|
+
| [`v15`](https://primer.style/css/utilities/borders#border-color-utilities) | `v16` |
|
|
89
|
+
| -------------------------------------------------------------------------- | ------------------------- |
|
|
90
|
+
| `.border-gray` | `.color-border-primary` |
|
|
91
|
+
| `.border-gray-light` | `.color-border-secondary` |
|
|
92
|
+
| `.border-gray-dark` | `.color-border-tertiary` |
|
|
93
|
+
| `.border-blue` | `.color-border-info` |
|
|
94
|
+
| `.border-green` | `.color-border-success` |
|
|
95
|
+
| `.border-yellow` | `.color-border-warning` |
|
|
96
|
+
| `.border-red` | `.color-border-danger` |
|
|
97
|
+
| `.border-white` | `.color-border-inverse` |
|
|
98
|
+
| `.border-gray-darker` | n/a |
|
|
99
|
+
| `.border-blue-light` | n/a |
|
|
100
|
+
| `.border-red-light` | n/a |
|
|
101
|
+
| `.border-purple` | n/a |
|
|
102
|
+
| `.border-black-fade` | n/a |
|
|
103
|
+
| `.border-white-fade` | n/a |
|
|
104
|
+
| `.border-white-fade-15` | n/a |
|
|
105
|
+
| `.border-white-fade-30` | n/a |
|
|
106
|
+
| `.border-white-fade-50` | n/a |
|
|
107
|
+
| `.border-white-fade-70` | n/a |
|
|
108
|
+
| `.border-white-fade-85` | n/a |
|
|
109
|
+
|
|
110
|
+
### Background
|
|
111
|
+
|
|
112
|
+
| [`v15`](https://primer.style/css/utilities/colors#background-utilities) | `v16` |
|
|
113
|
+
| ----------------------------------------------------------------------- | --------------------------- |
|
|
114
|
+
| `.bg-white` | `.color-bg-primary` |
|
|
115
|
+
| `.bg-gray-light` | `.color-bg-secondary` |
|
|
116
|
+
| `.bg-gray` | `.color-bg-tertiary` |
|
|
117
|
+
| `.bg-gray-dark` | `.color-bg-canvas-inverse` |
|
|
118
|
+
| `.bg-blue-light` | `.color-bg-info` |
|
|
119
|
+
| `.bg-blue` | `.color-bg-info-inverse` |
|
|
120
|
+
| `.bg-green-light` | `.color-bg-success` |
|
|
121
|
+
| `.bg-green` | `.color-bg-success-inverse` |
|
|
122
|
+
| `.bg-yellow-light` | `.color-bg-warning` |
|
|
123
|
+
| `.bg-yellow` | `.color-bg-warning-inverse` |
|
|
124
|
+
| `.bg-red-light` | `.color-bg-danger` |
|
|
125
|
+
| `.bg-red` | `.color-bg-danger-inverse` |
|
|
126
|
+
| n/a | `.color-bg-canvas` |
|
|
127
|
+
| n/a | `.color-bg-canvas-inset` |
|
|
128
|
+
| n/a | `.color-bg-overlay` |
|
|
129
|
+
| `.bg-purple-light` | n/a |
|
|
130
|
+
| `.bg-purple` | n/a |
|
|
131
|
+
| `.bg-yellow-dark` | n/a |
|
|
132
|
+
| `.bg-orange` | n/a |
|
|
133
|
+
| `.bg-pink` | n/a |
|
|
134
|
+
|
|
135
|
+
### Shadow
|
|
136
|
+
|
|
137
|
+
| `v15` | `v16` |
|
|
138
|
+
| ------------------------- | --------------------------- |
|
|
139
|
+
| `.box-shadow` | `.color-shadow-small` |
|
|
140
|
+
| `.box-shadow-medium` | `.color-shadow-medium` |
|
|
141
|
+
| `.box-shadow-large` | `.color-shadow-large` |
|
|
142
|
+
| `.box-shadow-extra-large` | `.color-shadow-extra-large` |
|
|
143
|
+
|
|
144
|
+
### Link
|
|
145
|
+
|
|
146
|
+
The `link` utilities are part of the `Link` component.
|
|
147
|
+
|
|
148
|
+
| [`v15`](https://primer.style/css/utilities/colors##link-colors) | `v16` |
|
|
149
|
+
| --------------------------------------------------------------- | ------------------ |
|
|
150
|
+
| `.link-gray-dark` | `.Link--primary` |
|
|
151
|
+
| `.link-gray` | `.Link--secondary` |
|
|
152
|
+
| `.muted-link` | `.Link--muted` |
|
|
153
|
+
| `.link-hover-blue` | `.Link--onHover` |
|
|
154
|
+
| n/a | `.Link` |
|
|
155
|
+
|
|
156
|
+
## Mixins
|
|
157
|
+
|
|
158
|
+
| `v15` | `v16` |
|
|
159
|
+
| --------------- | ----- |
|
|
160
|
+
| `btn-solid()` | n/a |
|
|
161
|
+
| `btn-inverse()` | n/a |
|
|
162
|
+
| `btn-outline()` | n/a |
|
|
163
|
+
|
|
164
|
+
## Variables
|
|
165
|
+
|
|
166
|
+
See [color system](/support/color-system) for a list of all the functional CSS variables.
|
|
167
|
+
|
|
168
|
+
### Text
|
|
169
|
+
|
|
170
|
+
| `v15` | `v16` |
|
|
171
|
+
| ------------------------------------ | ------------------------------- |
|
|
172
|
+
| `$text-gray-dark` (`$gray-900`) | `var(--color-text-primary)` |
|
|
173
|
+
| `$text-gray` (`$gray-600`) | `var(--color-text-secondary)` |
|
|
174
|
+
| `$text-gray-light` (`$gray-500`) | `var(--color-text-tertiary)` |
|
|
175
|
+
| `$text-blue` (`$blue-500`) | `var(--color-text-link)` |
|
|
176
|
+
| `$text-green` (`$green-600`) | `var(--color-text-success)` |
|
|
177
|
+
| `$text-red` (`$red-600`) | `var(--color-text-danger)` |
|
|
178
|
+
| `$text-yellow` (`$yellow-800`) | `var(--color-text-warning)` |
|
|
179
|
+
| `$text-white` (`$white`) | `var(--color-text-white)` |
|
|
180
|
+
| n/a | `var(--color-text-inverse)` |
|
|
181
|
+
| n/a | `var(--color-text-placeholder)` |
|
|
182
|
+
| n/a | `var(--color-text-disabled)` |
|
|
183
|
+
| `$text-black` (`$black`) | n/a |
|
|
184
|
+
| `$text-orange` (`$orange-900`) | n/a |
|
|
185
|
+
| `$text-orange-light` (`$orange-600`) | n/a |
|
|
186
|
+
| `$text-purple` (`$purple-500`) | n/a |
|
|
187
|
+
| `$text-pink` (`$pink-500`) | n/a |
|
|
188
|
+
|
|
189
|
+
### Icon
|
|
190
|
+
|
|
191
|
+
| `v15` | `v16` |
|
|
192
|
+
| ----- | ----------------------------- |
|
|
193
|
+
| n/a | `var(--color-icon-primary)` |
|
|
194
|
+
| n/a | `var(--color-icon-secondary)` |
|
|
195
|
+
| n/a | `var(--color-icon-tertiary)` |
|
|
196
|
+
| n/a | `var(--color-icon-info)` |
|
|
197
|
+
| n/a | `var(--color-icon-danger)` |
|
|
198
|
+
| n/a | `var(--color-icon-success)` |
|
|
199
|
+
| n/a | `var(--color-icon-warning)` |
|
|
200
|
+
|
|
201
|
+
### Border
|
|
202
|
+
|
|
203
|
+
| `v15` | `v16` |
|
|
204
|
+
| ----------------------------------------------------- | ------------------------------- |
|
|
205
|
+
| `$border-color` (`$gray-200`) | `var(--color-border-primary)` |
|
|
206
|
+
| `$border-gray` (`$gray-200`) | `var(--color-border-primary)` |
|
|
207
|
+
| `$border-gray-light` (`lighten($gray-200, 3%)`) | `var(--color-border-secondary)` |
|
|
208
|
+
| `$border-gray-dark` (`$gray-300`) | `var(--color-border-tertiary)` |
|
|
209
|
+
| `$border-white` (`$white`) | `var(--color-border-inverse)` |
|
|
210
|
+
| `$border-blue` (`$blue-500`) | `var(--color-border-info)` |
|
|
211
|
+
| `$border-green` (`$green-400`) | `var(--color-border-success)` |
|
|
212
|
+
| `$border-red` (`$red-500`) | `var(--color-border-danger)` |
|
|
213
|
+
| `$border-yellow` (`$yellow-600`) | `var(--color-border-warning)` |
|
|
214
|
+
| `$border-gray-darker` (`$gray-700`) | n/a |
|
|
215
|
+
| `$border-blue-light` (`$blue-200`) | n/a |
|
|
216
|
+
| `$border-red-light` (`$red-300`) | n/a |
|
|
217
|
+
| `$border-purple` (`$purple-500`) | n/a |
|
|
218
|
+
| `$border-black-fade` (`$black-fade-15`) | n/a |
|
|
219
|
+
| `$border-white-fade` (`$white-fade-15`) | n/a |
|
|
220
|
+
| `$border-green-light` (`desaturate($green-300, 40%)`) | n/a |
|
|
221
|
+
|
|
222
|
+
### Background
|
|
223
|
+
|
|
224
|
+
| `v15` | `v16` |
|
|
225
|
+
| ----------------------------------- | --------------------------------- |
|
|
226
|
+
| `$bg-white` (`$white`) | `var(--color-bg-primary)` |
|
|
227
|
+
| `$bg-gray-light` (`$gray-000`) | `var(--color-bg-secondary)` |
|
|
228
|
+
| `$bg-gray` (`$gray-100`) | `var(--color-bg-tertiary)` |
|
|
229
|
+
| `$bg-gray-dark` (`$gray-900`) | `var(--color-bg-canvas-inverse)` |
|
|
230
|
+
| `$bg-red` (`$red-500`) | `var(--color-bg-danger-inverse)` |
|
|
231
|
+
| `$bg-red-light` (`$red-000`) | `var(--color-bg-danger)` |
|
|
232
|
+
| `$bg-green` (`$green-500`) | `var(--color-bg-success-inverse)` |
|
|
233
|
+
| `$bg-green-light` (`$green-100`) | `var(--color-bg-success)` |
|
|
234
|
+
| `$bg-blue` (`$blue-500`) | `var(--color-bg-info-inverse)` |
|
|
235
|
+
| `$bg-blue-light` (`$blue-000`) | `var(--color-bg-info)` |
|
|
236
|
+
| `$bg-yellow` (`$yellow-500`) | `var(--color-bg-warning-inverse)` |
|
|
237
|
+
| `$bg-yellow-light` (`$yellow-200`) | `var(--color-bg-warning)` |
|
|
238
|
+
| n/a | `var(--color-bg-canvas)` |
|
|
239
|
+
| n/a | `var(--color-bg-canvas-inset)` |
|
|
240
|
+
| n/a | `var(--color-bg-overlay)` |
|
|
241
|
+
| `$bg-black` (`$black`) | n/a |
|
|
242
|
+
| `$bg-black-fade` (`$black-fade-50`) | n/a |
|
|
243
|
+
| `$bg-orange` (`$orange-700`) | n/a |
|
|
244
|
+
| `$bg-purple` (`$purple-500`) | n/a |
|
|
245
|
+
| `$bg-purple-light` (`$purple-000`) | n/a |
|
|
246
|
+
| `$bg-pink` (`$pink-500`) | n/a |
|
|
247
|
+
| `$bg-yellow-dark` (`$yellow-700`) | n/a |
|
|
248
|
+
|
|
249
|
+
### Shadow
|
|
250
|
+
|
|
251
|
+
| `v15` | `v16` |
|
|
252
|
+
| ------------------------- | --------------------------------- |
|
|
253
|
+
| `$box-shadow` | `var(--color-shadow-small)` |
|
|
254
|
+
| `$box-shadow-medium` | `var(--color-shadow-medium)` |
|
|
255
|
+
| `$box-shadow-large` | `var(--color-shadow-large)` |
|
|
256
|
+
| `$box-shadow-extra-large` | `var(--color-shadow-extra-large)` |
|
|
257
|
+
| `$box-shadow-highlight` | `var(--color-shadow-highlight)` |
|
|
258
|
+
| `$box-shadow-inset` | `var(--color-shadow-inset)` |
|
|
259
|
+
| `$box-shadow-focus` | `var(--color-state-focus-shadow)` |
|
|
260
|
+
|
|
261
|
+
## Color system
|
|
262
|
+
|
|
263
|
+
| `v15` | `v16` |
|
|
264
|
+
| ----------- | --------------------------- |
|
|
265
|
+
| `$black` | `var(--color-scale-black)` |
|
|
266
|
+
| `$white` | `var(--color-scale-white)` |
|
|
267
|
+
| `$gray-000` | `var(--color-scale-gray-0)` |
|
|
268
|
+
| `$gray-100` | `var(--color-scale-gray-1)` |
|
|
269
|
+
| `$gray-200` | `var(--color-scale-gray-2)` |
|
|
270
|
+
| ... | ... |
|
|
271
|
+
| `$pink-700` | `var(--color-scale-pink-7)` |
|
|
272
|
+
| `$pink-800` | `var(--color-scale-pink-8)` |
|
|
273
|
+
| `$pink-900` | `var(--color-scale-pink-9)` |
|
|
274
|
+
|
|
275
|
+
## Auto colors
|
|
276
|
+
|
|
277
|
+
| `v15` | `v16` |
|
|
278
|
+
| ----- | -------------------------- |
|
|
279
|
+
| n/a | `var(--color-auto-black)` |
|
|
280
|
+
| n/a | `var(--color-auto-white)` |
|
|
281
|
+
| n/a | `var(--color-auto-gray-0)` |
|
|
282
|
+
| n/a | `var(--color-auto-gray-1)` |
|
|
283
|
+
| n/a | `var(--color-auto-gray-2)` |
|
|
284
|
+
| ... | ... |
|
|
285
|
+
| n/a | `var(--color-auto-pink-7)` |
|
|
286
|
+
| n/a | `var(--color-auto-pink-8)` |
|
|
287
|
+
| n/a | `var(--color-auto-pink-9)` |
|
|
288
|
+
|
|
289
|
+
Note: The `auto` colors automatically invert based on the color mode. Example:
|
|
290
|
+
|
|
291
|
+
| Variable | In `light` mode | In `dark` mode |
|
|
292
|
+
| -------------------------- | --------------- | -------------- |
|
|
293
|
+
| `var(--color-auto-gray-0)` | light gray | dark gray |
|
|
294
|
+
| `var(--color-auto-gray-9)` | dark gray | light gray |
|
|
295
|
+
|
|
296
|
+
This doesn't work perfectly all the time, so you should use functional variables as much as possible. But in some cases auto colors can still be handy.
|
|
297
|
+
|
|
298
|
+
## Misc
|
|
299
|
+
|
|
300
|
+
A few more selectors and variables were removed. Please refer to [deprecations.js](https://github.com/primer/css/blob/main/deprecations.js) for a complete list.
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
Primer CSS `v18.0.0` replaces color modes V1 with V2. To help with the migration, please refer to the guide below.
|
|
2
|
+
|
|
3
|
+
<Note>
|
|
4
|
+
The functional CSS color variables changed as well. Please refer to the <a href="https://primer.style/primitives/colors#deprecated-variables">deprecated variables section</a>.
|
|
5
|
+
</Note>
|
|
6
|
+
|
|
7
|
+
## Utility classes
|
|
8
|
+
|
|
9
|
+
See [color utility classes](/utilities/colors) for a list of all the functional color utility classes.
|
|
10
|
+
|
|
11
|
+
### Text
|
|
12
|
+
|
|
13
|
+
| `v16` | `v18` |
|
|
14
|
+
| ----------------------- | ----------------------- |
|
|
15
|
+
| `.color-text-primary` | `.color-fg-default` |
|
|
16
|
+
| `.color-text-secondary` | `.color-fg-muted` |
|
|
17
|
+
| `.color-text-tertiary` | `.color-fg-muted` |
|
|
18
|
+
| `.color-text-link` | `.color-fg-accent` |
|
|
19
|
+
| `.color-text-success` | `.color-fg-success` |
|
|
20
|
+
| `.color-text-warning` | `.color-fg-attention` |
|
|
21
|
+
| `.color-text-danger` | `.color-fg-danger` |
|
|
22
|
+
| `.color-text-inverse` | `.color-fg-on-emphasis` |
|
|
23
|
+
| `.color-text-white` | n/a* |
|
|
24
|
+
|
|
25
|
+
* Often `.color-text-white` can be replaced with `.color-fg-on-emphasis`, but there are some cases where that's not ideal. If in doubt, please reach out to the `#primer` team.
|
|
26
|
+
|
|
27
|
+
### Icon
|
|
28
|
+
|
|
29
|
+
| `v16` | `v18` |
|
|
30
|
+
| ----------------------- | --------------------- |
|
|
31
|
+
| `.color-icon-primary` | `.color-fg-default` |
|
|
32
|
+
| `.color-icon-secondary` | `.color-fg-muted` |
|
|
33
|
+
| `.color-icon-tertiary` | `.color-fg-muted` |
|
|
34
|
+
| `.color-icon-info` | `.color-fg-accent` |
|
|
35
|
+
| `.color-icon-danger` | `.color-fg-danger` |
|
|
36
|
+
| `.color-icon-success` | `.color-fg-success` |
|
|
37
|
+
| `.color-icon-warning` | `.color-fg-attention` |
|
|
38
|
+
|
|
39
|
+
### Border
|
|
40
|
+
|
|
41
|
+
| `v16` | `v18` |
|
|
42
|
+
| ------------------------- | ---------------------------------- |
|
|
43
|
+
| `.color-border-primary` | `.color-border-default` |
|
|
44
|
+
| `.color-border-secondary` | `.color-border-muted` |
|
|
45
|
+
| `.color-border-tertiary` | `.color-border-default` |
|
|
46
|
+
| `.color-border-inverse` | n/a |
|
|
47
|
+
| `.color-border-info` | `.color-border-accent-emphasis` |
|
|
48
|
+
| `.color-border-warning` | `.color-border-attention-emphasis` |
|
|
49
|
+
|
|
50
|
+
### Background
|
|
51
|
+
|
|
52
|
+
| `v16` | `v18` |
|
|
53
|
+
| --------------------------- | ------------------------------ |
|
|
54
|
+
| `.color-bg-canvas` | `.color-bg-default` |
|
|
55
|
+
| `.color-bg-canvas-inverse` | `.color-bg-emphasis` |
|
|
56
|
+
| `.color-bg-canvas-inset` | `.color-bg-inset` |
|
|
57
|
+
| `.color-bg-primary` | `.color-bg-default` |
|
|
58
|
+
| `.color-bg-secondary` | `.color-bg-subtle` |
|
|
59
|
+
| `.color-bg-tertiary` | `.color-bg-subtle` |
|
|
60
|
+
| `.color-bg-info` | `.color-bg-accent` |
|
|
61
|
+
| `.color-bg-info-inverse` | `.color-bg-accent-emphasis` |
|
|
62
|
+
| `.color-bg-danger-inverse` | `.color-bg-danger-emphasis` |
|
|
63
|
+
| `.color-bg-success-inverse` | `.color-bg-success-emphasis` |
|
|
64
|
+
| `.color-bg-warning` | `.color-bg-attention` |
|
|
65
|
+
| `.color-bg-warning-inverse` | `.color-bg-attention-emphasis` |
|
|
66
|
+
|
|
67
|
+
## Misc
|
|
68
|
+
|
|
69
|
+
| `v16` | `v18` |
|
|
70
|
+
| --------------- | ------------------- |
|
|
71
|
+
| `.text-inherit` | `.color-fg-inherit` |
|
|
72
|
+
|
|
73
|
+
A few more selectors and variables were removed. Please refer to [deprecations.json](https://github.com/primer/css/blob/main/src/deprecations.json) for a complete list.
|
|
74
|
+
|
|
75
|
+
Note: The `<kbd>` styles also got removed from the markdown bundle. In case you import the `markdown` bundle **without** the `base` bundle, make sure to import the `<kbd>` styles as well:
|
|
76
|
+
|
|
77
|
+
```diff
|
|
78
|
+
@import "@primer/css/markdown/index.scss";
|
|
79
|
+
+ @import "@primer/css/base/kbd.scss";
|
|
80
|
+
```
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primer/css",
|
|
3
|
-
"version": "21.0.
|
|
3
|
+
"version": "21.0.8-rc.137251d9",
|
|
4
4
|
"description": "The CSS implementation of GitHub's Primer Design System",
|
|
5
5
|
"homepage": "https://primer.style/css",
|
|
6
6
|
"author": "GitHub, Inc.",
|
|
7
7
|
"engines": {
|
|
8
|
-
"node": "
|
|
8
|
+
"node": ">=16.0.0"
|
|
9
9
|
},
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"style": "dist/primer.css",
|
|
@@ -29,52 +29,52 @@
|
|
|
29
29
|
"dist": "script/dist.js",
|
|
30
30
|
"dist:watch": "chokidar \"src/**/*.scss\" -c \"script/dist.js\"",
|
|
31
31
|
"stylelint": "stylelint --quiet --rd 'src/**/*.scss'",
|
|
32
|
-
"stylelint:fix": "
|
|
32
|
+
"stylelint:fix": "npm run stylelint -- --fix",
|
|
33
33
|
"stylelint:remove-disables": "script/stylelint-remove-disables.js 'src/**/*.scss'",
|
|
34
34
|
"stylelint:add-disables": "script/stylelint-add-disables.js 'src/**/*.scss'",
|
|
35
35
|
"eslint": "eslint deprecations.js __tests__ script",
|
|
36
36
|
"prepublishOnly": "script/prepublish",
|
|
37
|
-
"start": "
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"test": "NODE_OPTIONS=--experimental-vm-modules yarn jest",
|
|
37
|
+
"start": "npm run dev",
|
|
38
|
+
"pretest": "npm run dist && script/pretest",
|
|
39
|
+
"test": "NODE_OPTIONS=--experimental-vm-modules npx jest",
|
|
41
40
|
"release": "changeset publish",
|
|
42
|
-
"storybook": "cd docs &&
|
|
41
|
+
"storybook": "cd docs && npm i && npx storybook build",
|
|
42
|
+
"build:storybook": "cd docs && npm i && npm run build:storybook"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@primer/primitives": "^7.11.12",
|
|
46
46
|
"@primer/view-components": "^0.1.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@changesets/changelog-github": "0.4.8",
|
|
50
|
-
"@changesets/cli": "2.26.1",
|
|
51
|
-
"@csstools/postcss-sass": "5.0.1",
|
|
52
|
-
"@github/prettier-config": "0.0.6",
|
|
49
|
+
"@changesets/changelog-github": "^0.4.8",
|
|
50
|
+
"@changesets/cli": "^2.26.1",
|
|
51
|
+
"@csstools/postcss-sass": "^5.0.1",
|
|
52
|
+
"@github/prettier-config": "^0.0.6",
|
|
53
53
|
"@primer/stylelint-config": "^12.7.1",
|
|
54
|
-
"autoprefixer": "10.4.13",
|
|
55
|
-
"chokidar-cli": "3.0.0",
|
|
56
|
-
"cssstats": "4.0.5",
|
|
57
|
-
"eslint": "8.37.0",
|
|
58
|
-
"eslint-plugin-github": "4.6.0",
|
|
59
|
-
"eslint-plugin-jest": "27.2.
|
|
60
|
-
"eslint-plugin-prettier": "4.2.1",
|
|
61
|
-
"filesize": "10.0.5",
|
|
62
|
-
"front-matter": "4.0.2",
|
|
63
|
-
"fs-extra": "11.1.0",
|
|
64
|
-
"globby": "13.1.4",
|
|
65
|
-
"jest": "29.5.0",
|
|
66
|
-
"js-yaml": "4.1.0",
|
|
67
|
-
"postcss": "8.4.5",
|
|
68
|
-
"postcss-calc": "8.2.4",
|
|
69
|
-
"postcss-import": "15.0.0",
|
|
70
|
-
"postcss-load-config": "4.0.1",
|
|
71
|
-
"postcss-scss": "4.0.5",
|
|
72
|
-
"postcss-simple-vars": "7.0.1",
|
|
54
|
+
"autoprefixer": "^10.4.13",
|
|
55
|
+
"chokidar-cli": "^3.0.0",
|
|
56
|
+
"cssstats": "^4.0.5",
|
|
57
|
+
"eslint": "^8.37.0",
|
|
58
|
+
"eslint-plugin-github": "^4.6.0",
|
|
59
|
+
"eslint-plugin-jest": "^27.2.2",
|
|
60
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
61
|
+
"filesize": "^10.0.5",
|
|
62
|
+
"front-matter": "^4.0.2",
|
|
63
|
+
"fs-extra": "^11.1.0",
|
|
64
|
+
"globby": "^13.1.4",
|
|
65
|
+
"jest": "^29.5.0",
|
|
66
|
+
"js-yaml": "^4.1.0",
|
|
67
|
+
"postcss": "^8.4.5",
|
|
68
|
+
"postcss-calc": "^8.2.4",
|
|
73
69
|
"postcss-custom-properties-fallback": "^1.0.2",
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
70
|
+
"postcss-import": "^15.0.0",
|
|
71
|
+
"postcss-load-config": "^4.0.1",
|
|
72
|
+
"postcss-scss": "^4.0.5",
|
|
73
|
+
"postcss-simple-vars": "^7.0.1",
|
|
74
|
+
"prettier": "^2.8.8",
|
|
75
|
+
"semver": "^7.3.8",
|
|
76
|
+
"stylelint": "^15.7.0",
|
|
77
|
+
"table": "^6.8.1"
|
|
78
78
|
},
|
|
79
79
|
"jest": {
|
|
80
80
|
"testEnvironment": "node",
|