Skip to content

Commit c8a2559

Browse files
Copilotjonrohan
andcommitted
Update @primer/primitives to 11.4.0 and adapt to new token structure
Co-authored-by: jonrohan <54012+jonrohan@users.noreply.github.com>
1 parent 5fe1d52 commit c8a2559

File tree

6 files changed

+26
-19
lines changed

6 files changed

+26
-19
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@primer/stylelint-config": patch
3+
---
4+
5+
Update @primer/primitives to version 11.4.0

__tests__/typography.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -61,21 +61,21 @@ testRule({
6161
},
6262
{
6363
code: '.x { font-size: 40px; }',
64-
fixed: '.x { font-size: var(--text-display-size); }',
65-
message: messages.rejected('40px', {name: '--text-display-size'}),
64+
fixed: '.x { font-size: var(--base-text-size-2xl); }',
65+
message: messages.rejected('40px', {name: '--base-text-size-2xl'}),
6666
line: 1,
6767
column: 17,
6868
endColumn: 21,
69-
description: "CSS > Replaces '40px' with 'var(--text-display-size)'.",
69+
description: "CSS > Replaces '40px' with 'var(--base-text-size-2xl)'.",
7070
},
7171
{
7272
code: '.x { font-size: 2.5rem; }',
73-
fixed: '.x { font-size: var(--text-display-size); }',
74-
message: messages.rejected('2.5rem', {name: '--text-display-size'}),
73+
unfixable: true,
74+
message: messages.rejected('2.5rem'),
7575
line: 1,
7676
column: 17,
7777
endColumn: 23,
78-
description: "CSS > Replaces '2.5rem' with 'var(--text-display-size)'.",
78+
description: "CSS > Errors on '2.5rem' (no exact match in primitives).",
7979
},
8080
// Font weights
8181
{
@@ -153,21 +153,21 @@ testRule({
153153
},
154154
{
155155
code: '.x { line-height: 1.4; }',
156-
fixed: '.x { line-height: var(--text-display-lineHeight); }',
157-
message: messages.rejected('1.4', {name: '--text-display-lineHeight'}),
156+
unfixable: true,
157+
message: messages.rejected('1.4'),
158158
line: 1,
159159
column: 19,
160160
endColumn: 22,
161-
description: "CSS > Replaces '1.4' line-height with 'var(--text-display-lineHeight)'.",
161+
description: "CSS > Errors on '1.4' line-height (no exact match in primitives).",
162162
},
163163
{
164164
code: '.x { line-height: 1.5; }',
165-
fixed: '.x { line-height: var(--text-body-lineHeight-large); }',
166-
message: messages.rejected('1.5', {name: '--text-body-lineHeight-large'}),
165+
fixed: '.x { line-height: var(--base-text-lineHeight-normal); }',
166+
message: messages.rejected('1.5', {name: '--base-text-lineHeight-normal'}),
167167
line: 1,
168168
column: 19,
169169
endColumn: 22,
170-
description: "CSS > Errors on '1.5' line-height and suggests '--text-body-lineHeight-large'.",
170+
description: "CSS > Errors on '1.5' line-height and suggests '--base-text-lineHeight-normal'.",
171171
},
172172
// Font family
173173
{

index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export default {
4444
importFrom: [
4545
'@primer/primitives/dist/css/functional/size/size-coarse.css',
4646
'@primer/primitives/dist/css/functional/size/border.css',
47+
'@primer/primitives/dist/css/functional/size/radius.css',
4748
'@primer/primitives/dist/css/functional/size/size.css',
4849
'@primer/primitives/dist/css/functional/size/size-fine.css',
4950
'@primer/primitives/dist/css/functional/size/breakpoints.css',

package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"@changesets/changelog-github": "^0.5.0",
5959
"@changesets/cli": "2.27.10",
6060
"@github/prettier-config": "^0.0.6",
61-
"@primer/primitives": "^11.3.0",
61+
"@primer/primitives": "^11.4.0",
6262
"@rollup/plugin-commonjs": "^28.0.0",
6363
"@rollup/plugin-json": "^6.1.0",
6464
"@rollup/plugin-node-resolve": "^15.2.3",

plugins/lib/utils.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export function primitivesVariables(type) {
1212
break
1313
case 'border':
1414
files.push('functional/size/border.json')
15+
files.push('functional/size/radius.json')
1516
files.push('functional/themes/light.json')
1617
break
1718
case 'typography':

0 commit comments

Comments
 (0)