From 04dcf27de5aca6ffe986a27c6b9c6dec35ef879f Mon Sep 17 00:00:00 2001 From: Philipp Spiess Date: Fri, 13 Dec 2024 15:07:04 +0100 Subject: [PATCH] Change Chrome target to 111 (#15389) Resolves https://github.com/tailwindlabs/tailwindcss/discussions/15387 This PR changes the Chrome target to 111. We initially picked 120 because of the unnecessary `:dir()` down-leveling but we that was maybe a bit too recent as it was causing some necessary prefixes to not be generated (e.g. `-webkit-background-clip`). This PR changes it to 111 which we require for the `color-mix()` function. To work around the `:dir()` down-leveling we also disable the `DirSelector` lightningcss feature which is used to control this behavior: https://sourcegraph.com/github.com/parcel-bundler/lightningcss/-/blob/src/selector.rs?L1964-1965 --- CHANGELOG.md | 1 + packages/@tailwindcss-cli/src/commands/build/index.ts | 4 ++-- packages/@tailwindcss-postcss/src/index.ts | 4 ++-- packages/@tailwindcss-vite/src/index.ts | 4 ++-- packages/tailwindcss/src/test-utils/run.ts | 4 ++-- packages/tailwindcss/src/utilities.test.ts | 1 + 6 files changed, 10 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6bcd4928543d..4b66a1ce5d60 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fix missing `shadow-none` suggestion in IntelliSense ([#15342](https://github.com/tailwindlabs/tailwindcss/pull/15342)) - Optimize AST before printing for IntelliSense ([#15347](https://github.com/tailwindlabs/tailwindcss/pull/15347)) - Improve debug logs to get better insights ([#15303](https://github.com/tailwindlabs/tailwindcss/pull/15303)) +- Generate vendor prefixes for Chrome features trialed between 111 and 119. ([#15389](https://github.com/tailwindlabs/tailwindcss/pull/15389)) ### Changed diff --git a/packages/@tailwindcss-cli/src/commands/build/index.ts b/packages/@tailwindcss-cli/src/commands/build/index.ts index 2a711eae354a..bf1066e906ca 100644 --- a/packages/@tailwindcss-cli/src/commands/build/index.ts +++ b/packages/@tailwindcss-cli/src/commands/build/index.ts @@ -445,12 +445,12 @@ function optimizeCss( deepSelectorCombinator: true, }, include: Features.Nesting, - exclude: Features.LogicalProperties, + exclude: Features.LogicalProperties | Features.DirSelector, targets: { safari: (16 << 16) | (4 << 8), ios_saf: (16 << 16) | (4 << 8), firefox: 128 << 16, - chrome: 120 << 16, + chrome: 111 << 16, }, errorRecovery: true, }).code diff --git a/packages/@tailwindcss-postcss/src/index.ts b/packages/@tailwindcss-postcss/src/index.ts index c49c53ecf1ec..c69b9a87538f 100644 --- a/packages/@tailwindcss-postcss/src/index.ts +++ b/packages/@tailwindcss-postcss/src/index.ts @@ -317,12 +317,12 @@ function optimizeCss( deepSelectorCombinator: true, }, include: LightningCssFeatures.Nesting, - exclude: LightningCssFeatures.LogicalProperties, + exclude: LightningCssFeatures.LogicalProperties | LightningCssFeatures.DirSelector, targets: { safari: (16 << 16) | (4 << 8), ios_saf: (16 << 16) | (4 << 8), firefox: 128 << 16, - chrome: 120 << 16, + chrome: 111 << 16, }, errorRecovery: true, }).code diff --git a/packages/@tailwindcss-vite/src/index.ts b/packages/@tailwindcss-vite/src/index.ts index b85538b9f259..b3c9ace1e0f5 100644 --- a/packages/@tailwindcss-vite/src/index.ts +++ b/packages/@tailwindcss-vite/src/index.ts @@ -375,12 +375,12 @@ function optimizeCss( deepSelectorCombinator: true, }, include: LightningCssFeatures.Nesting, - exclude: LightningCssFeatures.LogicalProperties, + exclude: LightningCssFeatures.LogicalProperties | LightningCssFeatures.DirSelector, targets: { safari: (16 << 16) | (4 << 8), ios_saf: (16 << 16) | (4 << 8), firefox: 128 << 16, - chrome: 120 << 16, + chrome: 111 << 16, }, errorRecovery: true, }).code diff --git a/packages/tailwindcss/src/test-utils/run.ts b/packages/tailwindcss/src/test-utils/run.ts index 0aa99e3e23cd..3dde1d282b4d 100644 --- a/packages/tailwindcss/src/test-utils/run.ts +++ b/packages/tailwindcss/src/test-utils/run.ts @@ -28,12 +28,12 @@ export function optimizeCss( deepSelectorCombinator: true, }, include: Features.Nesting, - exclude: Features.LogicalProperties, + exclude: Features.LogicalProperties | Features.DirSelector, targets: { safari: (16 << 16) | (4 << 8), ios_saf: (16 << 16) | (4 << 8), firefox: 128 << 16, - chrome: 120 << 16, + chrome: 111 << 16, }, errorRecovery: true, }).code diff --git a/packages/tailwindcss/src/utilities.test.ts b/packages/tailwindcss/src/utilities.test.ts index 967da7221aba..aaf1986cb197 100644 --- a/packages/tailwindcss/src/utilities.test.ts +++ b/packages/tailwindcss/src/utilities.test.ts @@ -11825,6 +11825,7 @@ test('bg-clip', async () => { } .bg-clip-text { + -webkit-background-clip: text; background-clip: text; }" `)