Skip to content

Commit ad67f15

Browse files
authored
Update v13-styles-replace-custom-property-font migration (#11603)
Reverting the incorrect removal of the `font-size-800` ➡️ `font-size-600` migration
1 parent f0d6537 commit ad67f15

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@shopify/polaris-migrator': patch
3+
---
4+
5+
Updated migration to replace deprecated `font` custom properties in polaris-react v13.0.0

polaris-migrator/src/migrations/v13-styles-replace-custom-property-font/tests/v13-styles-replace-custom-property-font.input.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.font {
22
font-size: var(--p-font-size-750);
3+
font-size: var(--p-font-size-800);
34
font-size: var(--p-font-size-900);
45
font-size: var(--p-font-size-1000);
56
font-size: var(--p-text-heading-2xl-font-size);

polaris-migrator/src/migrations/v13-styles-replace-custom-property-font/tests/v13-styles-replace-custom-property-font.output.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
font-size: var(--p-font-size-600);
33
font-size: var(--p-font-size-600);
44
font-size: var(--p-font-size-600);
5+
font-size: var(--p-font-size-600);
56
font-size: var(--p-text-heading-xl-font-size);
67
font-size: var(--p-text-heading-xl-font-size);
78
letter-spacing: var(--p-font-letter-spacing-dense);

polaris-migrator/src/migrations/v13-styles-replace-custom-property-font/transform.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export default function transformer(fileInfo: FileInfo, _: API) {
99
const replacementMaps = {
1010
'/.+/': {
1111
'--p-font-size-750': '--p-font-size-600',
12+
'--p-font-size-800': '--p-font-size-600',
1213
'--p-font-size-900': '--p-font-size-600',
1314
'--p-font-size-1000': '--p-font-size-600',
1415
'--p-font-letter-spacing-denser': '--p-font-letter-spacing-dense',

0 commit comments

Comments
 (0)