Migrating to CSS variables

Support for migrating from SCSS varibles to CSS variables

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, use the raw value or find a replacement that is close in value.

Legacy scss variableNew css variable
$h00-size-mobile--text-display-size
$h0-size-mobile--text-title-size-large
$h1-size-mobile26px deprecated
$h2-size-mobile22px deprecated
$h3-size-mobile18px deprecated
$h00-size--base-size-48
$h0-size--text-display-size
$h1-size--text-title-size-large
$h2-size--base-size-24
$h3-size--text-title-size-medium
$h4-size--text-title-size-small
$h5-size--text-body-size-medium
$h6-size--text-body-size-small
$font-size-small--text-body-size-small
$font-weight-bold--base-text-weight-semibold
$font-weight-semibold--base-text-weight-medium
$font-weight-normal--base-text-weight-normal
$font-weight-light--base-text-weight-light
$lh-condensed-ultra1`
$lh-condensed1.25`
$lh-default1.5`
$body-font--fontStack-system
$mono-font--fontStack-monospace
$body-font-size--text-body-size-medium
$body-line-height--text-body-lineHeight-medium
$spacer--base-size-8
$spacer-00 deprecated
$spacer-1--base-size-4
$spacer-2--base-size-8
$spacer-3--base-size-16
$spacer-4--base-size-24
$spacer-5--base-size-32
$spacer-6--base-size-40
$spacer-7--base-size-48
$spacer-8--base-size-64
$spacer-9--base-size-80
$spacer-10--base-size-96
$spacer-11--base-size-112
$spacer-12--base-size-128
$em-spacer-10.0625em deprecated
$em-spacer-20.125em deprecated
$em-spacer-30.25em deprecated
$em-spacer-40.375em deprecated
$em-spacer-50.5em deprecated
$em-spacer-60.75em deprecated
$size--base-size-16
$size-00 deprecated
$size-1--base-size-16
$size-2--base-size-20
$size-3--base-size-24
$size-4--base-size-28
$size-5--base-size-32
$size-6--base-size-40
$size-7--base-size-48
$size-8--base-size-64
$container-width980px deprecated
$grid-gutter10px deprecated
$width-xs0 deprecated
$width-sm--breakpoint-small
$width-md--breakpoint-medium
$width-lg--breakpoint-large
$width-xl--breakpoint-xlarge
$container-sm--breakpoint-small
$container-md--breakpoint-medium
$container-lg--breakpoint-large
$container-xl--breakpoint-xlarge
$viewport-narrow--viewportRange-narrow
$viewport-regular--viewportRange-regular
$viewport-wide--viewportRange-wide
$border-width--borderWidth-thin
$border-stylesolid deprecated
$bordersolid var(--borderWidth-thin) var(--borderColor-default)
$border-remsolid var(--borderWidth-thin) var(--borderColor-default)
$border-radius-1--borderRadius-small
$border-radius-2--borderRadius-medium
$border-radius-38px --borderRadius-medium`
$border-radius--borderRadius-small