Skip to content

Use more modern --alpha(color / 50%) syntax#15665

Merged
adamwathan merged 2 commits into
nextfrom
feat/use-different-alpha-syntax
Jan 17, 2025
Merged

Use more modern --alpha(color / 50%) syntax#15665
adamwathan merged 2 commits into
nextfrom
feat/use-different-alpha-syntax

Conversation

@RobinMalfait

Copy link
Copy Markdown
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
Comment thread CHANGELOG.md

### Changed

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

Copy link
Copy Markdown
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))

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.

2 participants