Skip to content

WIP #15449

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed

WIP #15449

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/@tailwindcss-cli/src/commands/build/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -445,12 +445,12 @@ function optimizeCss(
deepSelectorCombinator: true,
},
include: Features.Nesting,
exclude: Features.LogicalProperties | Features.DirSelector,
exclude: Features.LogicalProperties | Features.DirSelector | Features.VendorPrefixes,
targets: {
safari: (16 << 16) | (4 << 8),
ios_saf: (16 << 16) | (4 << 8),
safari: (17 << 16) | (5 << 8),
ios_saf: (17 << 16) | (5 << 8),
firefox: 128 << 16,
chrome: 111 << 16,
chrome: 123 << 16,
},
errorRecovery: true,
}).code
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,6 @@ exports[`\`@import 'tailwindcss'\` is replaced with the generated CSS 1`] = `
}

abbr:where([title]) {
-webkit-text-decoration: underline dotted;
text-decoration: underline dotted;
}

Expand All @@ -418,8 +417,6 @@ exports[`\`@import 'tailwindcss'\` is replaced with the generated CSS 1`] = `
a {
color: inherit;
-webkit-text-decoration: inherit;
-webkit-text-decoration: inherit;
-webkit-text-decoration: inherit;
text-decoration: inherit;
}

Expand Down
11 changes: 7 additions & 4 deletions packages/@tailwindcss-postcss/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,12 +317,15 @@ function optimizeCss(
deepSelectorCombinator: true,
},
include: LightningCssFeatures.Nesting,
exclude: LightningCssFeatures.LogicalProperties | LightningCssFeatures.DirSelector,
exclude:
LightningCssFeatures.LogicalProperties |
LightningCssFeatures.DirSelector |
LightningCssFeatures.VendorPrefixes,
targets: {
safari: (16 << 16) | (4 << 8),
ios_saf: (16 << 16) | (4 << 8),
safari: (17 << 16) | (5 << 8),
ios_saf: (17 << 16) | (5 << 8),
firefox: 128 << 16,
chrome: 111 << 16,
chrome: 123 << 16,
},
errorRecovery: true,
}).code
Expand Down
11 changes: 7 additions & 4 deletions packages/@tailwindcss-vite/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -375,12 +375,15 @@ function optimizeCss(
deepSelectorCombinator: true,
},
include: LightningCssFeatures.Nesting,
exclude: LightningCssFeatures.LogicalProperties | LightningCssFeatures.DirSelector,
exclude:
LightningCssFeatures.LogicalProperties |
LightningCssFeatures.DirSelector |
LightningCssFeatures.VendorPrefixes,
targets: {
safari: (16 << 16) | (4 << 8),
ios_saf: (16 << 16) | (4 << 8),
safari: (17 << 16) | (5 << 8),
ios_saf: (17 << 16) | (5 << 8),
firefox: 128 << 16,
chrome: 111 << 16,
chrome: 123 << 16,
},
errorRecovery: true,
}).code
Expand Down
3 changes: 0 additions & 3 deletions packages/tailwindcss/src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,6 @@ describe('compiling CSS', () => {
),
).toMatchInlineSnapshot(`
".\\[text-size-adjust\\:none\\] {
-webkit-text-size-adjust: none;
-moz-text-size-adjust: none;
text-size-adjust: none;
}"
`)
Expand Down Expand Up @@ -1409,7 +1407,6 @@ describe('Parsing themes values from CSS', () => {
}

.decoration-salad {
-webkit-text-decoration-color: var(--text-decoration-color-salad);
-webkit-text-decoration-color: var(--text-decoration-color-salad);
text-decoration-color: var(--text-decoration-color-salad);
}
Expand Down
8 changes: 4 additions & 4 deletions packages/tailwindcss/src/test-utils/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ export function optimizeCss(
deepSelectorCombinator: true,
},
include: Features.Nesting,
exclude: Features.LogicalProperties | Features.DirSelector,
exclude: Features.LogicalProperties | Features.DirSelector | Features.VendorPrefixes,
targets: {
safari: (16 << 16) | (4 << 8),
ios_saf: (16 << 16) | (4 << 8),
safari: (17 << 16) | (5 << 8),
ios_saf: (17 << 16) | (5 << 8),
firefox: 128 << 16,
chrome: 111 << 16,
chrome: 123 << 16,
},
errorRecovery: true,
}).code
Expand Down
84 changes: 7 additions & 77 deletions packages/tailwindcss/src/utilities.test.ts

Large diffs are not rendered by default.

11 changes: 7 additions & 4 deletions packages/tailwindcss/src/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2686,7 +2686,10 @@ export function createUtilities(theme: Theme) {
/**
* @css `background-clip`
*/
staticUtility('bg-clip-text', [['background-clip', 'text']])
staticUtility('bg-clip-text', [
['background-clip', 'text'],
['-webkit-background-clip', 'text'],
])
staticUtility('bg-clip-border', [['background-clip', 'border-box']])
staticUtility('bg-clip-padding', [['background-clip', 'padding-box']])
staticUtility('bg-clip-content', [['background-clip', 'content-box']])
Expand Down Expand Up @@ -3037,7 +3040,7 @@ export function createUtilities(theme: Theme) {
{
let value = resolveThemeColor(candidate, theme, ['--text-decoration-color', '--color'])
if (value) {
return [decl('text-decoration-color', value)]
return [decl('-webkit-text-decoration-color', value), decl('text-decoration-color', value)]
}
}
})
Expand Down Expand Up @@ -3537,7 +3540,7 @@ export function createUtilities(theme: Theme) {
staticUtility('transition-colors', [
[
'transition-property',
'color, background-color, border-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to',
'color, background-color, border-color, -webkit-text-decoration-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to',
],
['transition-timing-function', defaultTimingFunction],
['transition-duration', defaultDuration],
Expand All @@ -3560,7 +3563,7 @@ export function createUtilities(theme: Theme) {

functionalUtility('transition', {
defaultValue:
'color, background-color, border-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter',
'color, background-color, border-color, -webkit-text-decoration-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter',
themeKeys: ['--transition-property'],
handle: (value) => [
decl('transition-property', value),
Expand Down