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

New features, bugfixes, better testing #187

Open
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

adamhotep
Copy link

@adamhotep adamhotep commented May 29, 2023

  • Resolves Benchmark script is broken #128 (bench with neovim) via #127
  • Fixes other bugs in the bench script (e.g. vim packages support, -o doesn't work)
  • Resolves Support for unitless hsl values in Sass #140 (non-percent saturation/luminance for SASS & SCSS)
  • Resolves Error when writing an invalid RGB color #151 (color overflows)
  • Refuses to render invalid color specifications (e.g. color: rgb(0, 17, 136 / 100%))
  • Adds much more comprehensive test suites for css and html, including items that should not be colored.
  • Implements HSL (Hue, Saturation, Lightness) angles (e.g. color: hsl(167grad, 30%, 60%))
  • Implements HWB (Hue, Whiteness, Blackness) function coloring
  • Supports decimals and spaced values (e.g. color: rgb(0 16.99 136))
  • Support legacy HTML3-style colors (e.g. <body text="blue"> and <font color="#abcdef">)
  • Probably some more

Benchmark testing showed no appreciable increase in cost to run, but I don't like how inconsistent its stats are.

To implement hwb(), I abstracted hsl2color() to hsl2rgb() in order to retain the RGB channels. While at it, I also converted the other similar functions so there's now only one place where RGB is converted to hexadecimal representation.

…ded support for different angle units, hwb(), and decimal values
…otal"

(which you'll notice is quite a bit higher than -o would have shown)
…eyword including dashes

(Also: it doesn�t work; try a similar exclusion to avoid `width: calc(100px * tan(45deg))` and you'll find you can�t.)
also made the default run (all test files) work from any directory
Support non-percent saturation/luminance & whiteness/blackness in SASS and SCSS but prevent them in standard CSS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant