Skip to content
Merged
Prev Previous commit
Next Next commit
Prefix all CSS variables inside preflight
  • Loading branch information
philipp-spiess committed Mar 17, 2025
commit ec02aa72f7d30503de2622a9d52248fe64a71e49
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fix `border-[12px_4px]` being interpreted as a `border-color` instead of a `border-width` ([#17248](https://github.com/tailwindlabs/tailwindcss/pull/17248))
- Use the `oklab(…)` function when applying opacity to `currentColor` to work around a crash in Safari 16.4 and 16.5 ([#17247](https://github.com/tailwindlabs/tailwindcss/pull/17247))
- Pre-process `<template lang="…">` in Vue files ([#17252](https://github.com/tailwindlabs/tailwindcss/pull/17252))
- Ensure that all CSS variables used by preflight are prefixed ([#17036](https://github.com/tailwindlabs/tailwindcss/pull/17036))

### Changed

- The `--theme(…)` function now returns CSS variables for your theme values unless used inside positions where CSS variables are invalid (e.g. `@media` queries) ([#17036](https://github.com/tailwindlabs/tailwindcss/pull/17036))

## [4.0.14] - 2025-03-13

Expand Down
12 changes: 6 additions & 6 deletions packages/tailwindcss/preflight.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ html,
line-height: 1.5; /* 1 */
-webkit-text-size-adjust: 100%; /* 2 */
tab-size: 4; /* 3 */
font-family: var(
font-family: --theme(
--default-font-family,
ui-sans-serif,
system-ui,
Expand All @@ -40,8 +40,8 @@ html,
'Segoe UI Symbol',
'Noto Color Emoji'
); /* 4 */
font-feature-settings: var(--default-font-feature-settings, normal); /* 5 */
font-variation-settings: var(--default-font-variation-settings, normal); /* 6 */
font-feature-settings: --theme(--default-font-feature-settings, normal); /* 5 */
font-variation-settings: --theme(--default-font-variation-settings, normal); /* 6 */
-webkit-tap-highlight-color: transparent; /* 7 */
}

Expand Down Expand Up @@ -118,7 +118,7 @@ code,
kbd,
samp,
pre {
font-family: var(
font-family: --theme(
--default-mono-font-family,
ui-monospace,
SFMono-Regular,
Expand All @@ -129,8 +129,8 @@ pre {
'Courier New',
monospace
); /* 1 */
font-feature-settings: var(--default-mono-font-feature-settings, normal); /* 2 */
font-variation-settings: var(--default-mono-font-variation-settings, normal); /* 3 */
font-feature-settings: --theme(--default-mono-font-feature-settings, normal); /* 2 */
font-variation-settings: --theme(--default-mono-font-variation-settings, normal); /* 3 */
font-size: 1em; /* 4 */
}

Expand Down
Loading