Skip to content
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

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

Merged
merged 2 commits into from
Jan 17, 2025

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
@@ -18,6 +18,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Write to `stdout` when `--output -` flag is used for `@tailwindcss/cli` ([#15656](https://github.com/tailwindlabs/tailwindcss/pull/15656))
- _Upgrade (experimental)_: Pretty print `--spacing(…)` to prevent ambiguity ([#15596](https://github.com/tailwindlabs/tailwindcss/pull/15596))

### 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.

2 participants