Skip to content

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

2 participants