Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
langermank committed Apr 17, 2024
1 parent 338e96e commit 98d1733
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions content/foundations/primitives/migrating.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,17 @@ description:

## CSS variable replacements for SCSS variables

Most legacy `scss` variables from Primer CSS have new CSS variable replacements. For values that have no replacement listed, consider using a similar variable. For example, `$border-radius-3` should probably use `var(--borderRadius-medium)`.
Most legacy SCSS variables from Primer CSS have new CSS variable replacements.

For values that have no replacement listed, use the raw value or find a replacement that is close in value.

| Legacy `scss` variable | New `css` variable |
| -- | -- |
| $h00-size-mobile | --text-display-size |
| $h0-size-mobile | --text-title-size-large |
| $h1-size-mobile | 26px |
| $h2-size-mobile | 22px |
| $h3-size-mobile | 18px |
| $h1-size-mobile | 26px `deprecated` |
| $h2-size-mobile | 22px `deprecated` |
| $h3-size-mobile | 18px `deprecated` |
| $h00-size | --base-size-48 |
| $h0-size | --text-display-size |
| $h1-size | --text-title-size-large |
Expand All @@ -36,7 +38,7 @@ Most legacy `scss` variables from Primer CSS have new CSS variable replacements.
| $body-font-size | --text-body-size-medium |
| $body-line-height | --text-body-lineHeight-medium |
| $spacer | --base-size-8 |
| $spacer-0 | 0 |
| $spacer-0 | 0 `deprecated` |
| $spacer-1 | --base-size-4 |
| $spacer-2 | --base-size-8 |
| $spacer-3 | --base-size-16 |
Expand All @@ -49,14 +51,14 @@ Most legacy `scss` variables from Primer CSS have new CSS variable replacements.
| $spacer-10 | --base-size-96 |
| $spacer-11 | --base-size-112 |
| $spacer-12 | --base-size-128 |
| $em-spacer-1 | 0.0625em |
| $em-spacer-2 | 0.125em |
| $em-spacer-3 | 0.25em |
| $em-spacer-4 | 0.375em |
| $em-spacer-5 | 0.5em |
| $em-spacer-6 | 0.75em |
| $em-spacer-1 | 0.0625em `deprecated` |
| $em-spacer-2 | 0.125em `deprecated`|
| $em-spacer-3 | 0.25em `deprecated` |
| $em-spacer-4 | 0.375em `deprecated` |
| $em-spacer-5 | 0.5em `deprecated` |
| $em-spacer-6 | 0.75em `deprecated` |
| $size | --base-size-16 |
| $size-0 | 0 |
| $size-0 | 0 `deprecated` |
| $size-1 | --base-size-16 |
| $size-2 | --base-size-20 |
| $size-3 | --base-size-24 |
Expand All @@ -65,9 +67,9 @@ Most legacy `scss` variables from Primer CSS have new CSS variable replacements.
| $size-6 | --base-size-40 |
| $size-7 | --base-size-48 |
| $size-8 | --base-size-64 |
| $container-width | 980px |
| $grid-gutter | 10px |
| $width-xs | 0 |
| $container-width | 980px `deprecated` |
| $grid-gutter | 10px `deprecated` |
| $width-xs | 0 `deprecated` |
| $width-sm | --breakpoint-small |
| $width-md | --breakpoint-medium |
| $width-lg | --breakpoint-large |
Expand All @@ -80,10 +82,10 @@ Most legacy `scss` variables from Primer CSS have new CSS variable replacements.
| $viewport-regular | --viewportRange-regular |
| $viewport-wide | --viewportRange-wide |
| $border-width | --borderWidth-thin |
| $border-style | solid |
| $border-style | solid `deprecated` |
| $border | solid var(--borderWidth-thin) var(--borderColor-default) |
| $border-rem | solid var(--borderWidth-thin) var(--borderColor-default) |
| $border-radius-1 | --borderRadius-small |
| $border-radius-2 | --borderRadius-medium |
| $border-radius-3 | 8px |
| $border-radius-3 | 8px --borderRadius-medium |
| $border-radius | --borderRadius-small |

0 comments on commit 98d1733

Please sign in to comment.