Skip to content

Conversation

@RobinMalfait
Copy link
Member

This PR changes the syntax for the --alpha(…) function to look like more modern CSS.

The arguments to apply an alpha to a color is using the / syntax instead of the comma syntax.

- --alpha(color, 50%)
+ --alpha(color / 50%)

This syntax is now similar to modern rgb(0 0 0 / 50%) syntax in CSS.

@RobinMalfait RobinMalfait marked this pull request as ready for review January 17, 2025 23:31
@RobinMalfait RobinMalfait requested a review from a team as a code owner January 17, 2025 23:31

### Changed

- Use more modern `--alpha(color / 50%)` syntax instead of `--alpha(color, 50%)` ([#15665](https://github.com/tailwindlabs/tailwindcss/pull/15665))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Use more modern `--alpha(color / 50%)` syntax instead of `--alpha(color, 50%)` ([#15665](https://github.com/tailwindlabs/tailwindcss/pull/15665))
- Change `--alpha()` syntax to use a slash instead of a comma (e.g. `--alpha(color / 50%)` instead of `--alpha(color, 50%)`) ([#15665](https://github.com/tailwindlabs/tailwindcss/pull/15665))

@adamwathan adamwathan merged commit a51b214 into next Jan 17, 2025
5 checks passed
@adamwathan adamwathan deleted the feat/use-different-alpha-syntax branch January 17, 2025 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants