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

Support HSL with hue units in arbitrary values #6726

Merged
merged 1 commit into from
Dec 24, 2021
Merged

Conversation

adamwathan
Copy link
Member

Fixes #6709.

This PR updates our color parser to support hsl colors in these formats:

hsl(0deg, 30%, 60%)
hsl(0rad, 30%, 60%)
hsl(0grad, 30%, 60%)
hsl(0turn, 30%, 60%)
hsla(0deg, 30%, 60%, 0.5)
hsla(0rad, 30%, 60%, 0.5)
hsla(0grad, 30%, 60%, 0.5)
hsla(0turn, 30%, 60%, 0.5)
hsl(0deg 30% 60%)
hsl(0rad 30% 60%)
hsl(0grad 30% 60%)
hsl(0turn 30% 60%)
hsl(0deg 30% 60% / 0.5)
hsl(0rad 30% 60% / 0.5)
hsl(0grad 30% 60% / 0.5)
hsl(0turn 30% 60% / 0.5)

Previously, using any unit after the hue value would fail our color detection and therefore not work properly with arbitrary value utilities like bg-hsl(0rad,10%,60%).

@adamwathan adamwathan merged commit 1d5aa27 into master Dec 24, 2021
@adamwathan adamwathan deleted the hue-units branch December 24, 2021 18:20
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.

HSL no longer works in JIT
1 participant