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

Significantly improve syntax support #175

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chris-morgan
Copy link

Things now supported:

  • Fractions: hsl(25.7, 100%, 53.3%) = #f71.
  • Hue units deg, rad, grad, turn.
  • Negative hue rotations.
  • The fairly new commaless syntax: rgb(0 255 0) = rgb(0, 255, 0), hsl(210 50% 50% / 50%) = hsla(210, 50%, 50%, 0.5).

I’ve added just one simple demonstration test. I’m too lazy to add it to more sample files.

(I finally got sufficiently fed up with these things not working to spend a few minutes fixing it. 🙂)

@ap
Copy link
Owner

ap commented Aug 19, 2022

Thank you for the patch! Now I have some reading up to do. 🙂

(I finally got sufficiently fed up with these things not working to spend a few minutes fixing it. 🙂)

You could have filed a feature request! 🙂 I haven’t been keeping up with developments in the web standards anything like as close as I used to so I didn’t notice CSS Color falling out of date – but it is meant to support the full spec, and nudges in that direction are always welcome and appreciated.

@chris-morgan
Copy link
Author

You could have filed a feature request!

I could also just do it. 😀

(Seriously, filing a good feature request would have taken almost as much effort as just implementing it. This is why I love open source software as distinct from just free software.)

Things now supported:

• Fractions: hsl(25.7, 100%, 53.3%) = #f71.

• Hue units deg, rad, grad, turn.

• Negative hue rotations.

• The fairly new commaless syntax:
  rgb(0 255 0) = rgb(0, 255, 0),
  hsl(210 50% 50% / 50%) = hsla(210, 50%, 50%, 0.5).

I’ve added just one simple demonstration test.
I’m too lazy to add it to more sample files.
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.

None yet

2 participants