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

Add support for the following HSL syntax #900

Closed
wants to merge 1 commit into from

Conversation

spacecat
Copy link

@spacecat spacecat commented Feb 4, 2024

Add support for the following HSL syntax:

hsl(360 50% 50%)
hsl(360deg 50% 50%)
hsl(360deg, 50%, 50%)

Note: The legacy hsla() syntax is an alias for hsl(), accepting the same parameters and behaving in the same way.

Source: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/hsl

So hsla regex should be removed IMO.

hsl(360 50% 50%)
hsl(360deg 50% 50%)
hsl(360deg, 50%, 50%)

Note: The legacy hsla() syntax is an alias for hsl(), accepting the same parameters and behaving in the same way.

Source: https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/hsl

So hsla regex should be removed IMO.
@spacecat
Copy link
Author

spacecat commented Feb 4, 2024

@KamiKillertO you think you have some time to check this PR? 🙂

@KamiKillertO
Copy link
Owner

@spacecat Can you add some tests?

@spacecat
Copy link
Author

Sorry, life caught up with me.. been and am very busy so won't be able to create tests in a while if ever... :( I hope someone else can find some time to do it or create an entirely new PR.

@KamiKillertO
Copy link
Owner

I've just merged a PR that add partial for the new syntax while keeping support for legacy one

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