|
| 1 | +# HEAD |
| 2 | + |
| 3 | +This version introduces some major modernization changes around CSS and drops browser support for XXXX. |
| 4 | + |
| 5 | +The good news is we don't expect any visible changes in modern browsers and you should be able to do some automated visual regression testing to help with the migration. |
| 6 | + |
| 7 | +Introducing theme variables! CSS variables beginning with `--theme-` will adjust based on media queries. |
| 8 | + |
| 9 | +## Modernization |
| 10 | + |
| 11 | +### Typography |
| 12 | + |
| 13 | +* Transition from Sass variables to CSS variables for typography. (#982) |
| 14 | +* Renamed existing CSS variables to use `--token-` prefix. |
| 15 | +* Introduced CSS variables with the `--theme-` prefix for values that adjust based on media queries. |
| 16 | + |
| 17 | +### Color |
| 18 | + |
| 19 | +* To come in follow up PR. |
| 20 | + |
| 21 | +## Migration Tips |
| 22 | + |
| 23 | +* Browser support |
| 24 | + * If you require support for older browsers we recommend adding some post-processing to your work flow for css variables and font sizes in pixels. |
| 25 | +* `text-title-*` mixins now declare `font-family`. |
| 26 | + * You can remove any `font-family` declarations from places which use these mixins (unless you don't want the default heading font). |
| 27 | +* Update Sass variables to use CSS variables: |
| 28 | + * `$body-text-color` → `var(--theme-body-text-color)` |
| 29 | + * `$body-text-color-inverse` → `var(--theme-body-text-color-inverse)` |
| 30 | + * `$body-text-color-secondary` → `var(--theme-body-text-color-secondary)` |
| 31 | + * `$body-text-color-secondary-inverse` → `var(--theme-body-text-color-secondary-inverse)` |
| 32 | + * `$title-text-color` → `var(--token-title-text-color)` |
| 33 | + * `$title-text-color-inverse` → `var(--token-title-text-color-inverse)` |
| 34 | + * `$body-font-family` → `var(--theme-body-font-family)` |
| 35 | + * `$title-font-family` → `var(--theme-title-font-family)` |
| 36 | + * `$body-line-height` → `var(--theme-body-line-height)` |
| 37 | +* Rename CSS variables: |
| 38 | + * `--body-text-color` → `--token-body-text-color` |
| 39 | + * `--body-text-color-inverse` → `--token-body-text-color-inverse` |
| 40 | + * `--body-text-color-secondary` → `--token-body-text-color-secondary` |
| 41 | + * `--body-text-color-secondary-inverse` → `--token-body-text-color-secondary-inverse` |
| 42 | + * `--title-text-color` → `--token-title-text-color` |
| 43 | + * `--title-text-color-inverse` → `--token-title-text-color-inverse` |
| 44 | + * `--body-font-family` → `--theme-body-font-family` |
| 45 | + * `--title-font-family` → `--theme-title-font-family` |
| 46 | + * `--body-line-height` → `--theme-body-line-height` |
| 47 | +* Replace any remaining `text-display-*` usage with the equivalent `text-title-*` mixin (see migration notes for version 11.0.2.): |
| 48 | + * `text-display-xxl` → `text-title-2xl` |
| 49 | + * `text-display-xl` → `text-title-xl` |
| 50 | + * `text-display-lg` → `text-title-lg` |
| 51 | + * `text-display-md` → `text-title-md` |
| 52 | + * `text-display-sm` → `text-title-sm` |
| 53 | + * `text-display-xs` → `text-title-xs` |
| 54 | + * `text-display-xxs` → `text-title-2xs` |
| 55 | + |
1 | 56 | # 22.0.0 |
2 | 57 |
|
3 | 58 | ## Features |
@@ -199,8 +254,8 @@ stating variables explicitly, like this: |
199 | 254 |
|
200 | 255 | @supports (--css: variables) { |
201 | 256 | background-color: var(--background-color-inverse); |
202 | | - color: var(--body-text-color-inverse); |
203 | | - line-height: var(--body-line-height); |
| 257 | + color: var(--token-body-text-color-inverse); |
| 258 | + line-height: var(--token-body-line-height); |
204 | 259 | } |
205 | 260 | } |
206 | 261 | ``` |
|
0 commit comments