Skip to content

Add support for “intensity” modifiers on box and text shadows #17398

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

Merged
merged 15 commits into from
Mar 28, 2025
Merged
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- _Experimental_: Add `text-shadow-*` utilities ([#17389](https://github.com/tailwindlabs/tailwindcss/pull/17389))
- Added new `bg-{top,bottom}-{left,right}` utilities ([#17378](https://github.com/tailwindlabs/tailwindcss/pull/17378))
- Added new `bg-{position,size}-*` utilities for arbitrary values ([#17432](https://github.com/tailwindlabs/tailwindcss/pull/17432))
- Added new `shadow-*/{alpha}`, `inset-shadow-*/{alpha}`, and `text-shadow-*/{alpha}` utilities to control shadow opacity ([#17398](https://github.com/tailwindlabs/tailwindcss/pull/17398))

### Fixed

Expand Down
12 changes: 12 additions & 0 deletions packages/tailwindcss/src/__snapshots__/index.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ exports[`compiling CSS > \`@tailwind utilities\` is replaced by utilities using
inherits: false
}

@property --tw-shadow-alpha {
syntax: "<percentage>";
inherits: false;
initial-value: 100%;
}

@property --tw-inset-shadow {
syntax: "*";
inherits: false;
Expand All @@ -47,6 +53,12 @@ exports[`compiling CSS > \`@tailwind utilities\` is replaced by utilities using
inherits: false
}

@property --tw-inset-shadow-alpha {
syntax: "<percentage>";
inherits: false;
initial-value: 100%;
}

@property --tw-ring-color {
syntax: "*";
inherits: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4672,6 +4672,27 @@ exports[`getClassList 1`] = `
"inset-ring-transparent/95",
"inset-ring-transparent/100",
"inset-shadow",
"inset-shadow/0",
"inset-shadow/5",
"inset-shadow/10",
"inset-shadow/15",
"inset-shadow/20",
"inset-shadow/25",
"inset-shadow/30",
"inset-shadow/35",
"inset-shadow/40",
"inset-shadow/45",
"inset-shadow/50",
"inset-shadow/55",
"inset-shadow/60",
"inset-shadow/65",
"inset-shadow/70",
"inset-shadow/75",
"inset-shadow/80",
"inset-shadow/85",
"inset-shadow/90",
"inset-shadow/95",
"inset-shadow/100",
"inset-shadow-current",
"inset-shadow-current/0",
"inset-shadow-current/5",
Expand Down Expand Up @@ -4717,7 +4738,29 @@ exports[`getClassList 1`] = `
"inset-shadow-inherit/95",
"inset-shadow-inherit/100",
"inset-shadow-initial",
"inset-shadow-none",
"inset-shadow-sm",
"inset-shadow-sm/0",
"inset-shadow-sm/5",
"inset-shadow-sm/10",
"inset-shadow-sm/15",
"inset-shadow-sm/20",
"inset-shadow-sm/25",
"inset-shadow-sm/30",
"inset-shadow-sm/35",
"inset-shadow-sm/40",
"inset-shadow-sm/45",
"inset-shadow-sm/50",
"inset-shadow-sm/55",
"inset-shadow-sm/60",
"inset-shadow-sm/65",
"inset-shadow-sm/70",
"inset-shadow-sm/75",
"inset-shadow-sm/80",
"inset-shadow-sm/85",
"inset-shadow-sm/90",
"inset-shadow-sm/95",
"inset-shadow-sm/100",
"inset-shadow-transparent",
"inset-shadow-transparent/0",
"inset-shadow-transparent/5",
Expand Down Expand Up @@ -7306,6 +7349,27 @@ exports[`getClassList 1`] = `
"sepia-50",
"sepia-100",
"shadow",
"shadow/0",
"shadow/5",
"shadow/10",
"shadow/15",
"shadow/20",
"shadow/25",
"shadow/30",
"shadow/35",
"shadow/40",
"shadow/45",
"shadow/50",
"shadow/55",
"shadow/60",
"shadow/65",
"shadow/70",
"shadow/75",
"shadow/80",
"shadow/85",
"shadow/90",
"shadow/95",
"shadow/100",
"shadow-current",
"shadow-current/0",
"shadow-current/5",
Expand Down Expand Up @@ -7757,6 +7821,27 @@ exports[`getClassList 1`] = `
"text-pretty",
"text-right",
"text-shadow",
"text-shadow/0",
"text-shadow/5",
"text-shadow/10",
"text-shadow/15",
"text-shadow/20",
"text-shadow/25",
"text-shadow/30",
"text-shadow/35",
"text-shadow/40",
"text-shadow/45",
"text-shadow/50",
"text-shadow/55",
"text-shadow/60",
"text-shadow/65",
"text-shadow/70",
"text-shadow/75",
"text-shadow/80",
"text-shadow/85",
"text-shadow/90",
"text-shadow/95",
"text-shadow/100",
"text-shadow-current",
"text-shadow-current/0",
"text-shadow-current/5",
Expand Down
12 changes: 12 additions & 0 deletions packages/tailwindcss/src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1499,6 +1499,12 @@ describe('Parsing theme values from CSS', () => {
inherits: false
}

@property --tw-shadow-alpha {
syntax: "<percentage>";
inherits: false;
initial-value: 100%;
}

@property --tw-inset-shadow {
syntax: "*";
inherits: false;
Expand All @@ -1510,6 +1516,12 @@ describe('Parsing theme values from CSS', () => {
inherits: false
}

@property --tw-inset-shadow-alpha {
syntax: "<percentage>";
inherits: false;
initial-value: 100%;
}

@property --tw-ring-color {
syntax: "*";
inherits: false
Expand Down
Loading