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

css-color-parser + postcss-color-mix-function #877

Merged
merged 54 commits into from Mar 22, 2023

Conversation

romainmenke
Copy link
Member

@romainmenke romainmenke commented Feb 26, 2023

  • css-color-parser package
  • postcss-color-mix-function plugin
  • refactored postcss-hwb-function plugin
  • refactored postcss-lab-function plugin
  • refactored postcss-oklab-function plugin
  • refactored postcss-color-function plugin
  • removed some unused functions from color-helpers package
  • better checks for lower case matches in some functions 1
  • better fallbacks for in/out of gamut colors with smaller overal output as a result

Things I skipped/didn't change :

  • postcss-color-functional-notation, technically css-color-parser can help here, but this plugin is more a syntax desugaring and not really a color transform
  • relative color syntax because it just doesn't seem ready yet for implementations

I think this is ready to be shipped as a standalone plugin.

There are a few minor open issues I still want to wait on before adding to postcss-preset-env. It seems that browsers have incorrect implementations for a wide range of cases and I don't want to add to postcss-preset-env before confirmation that our implementation is correct.


Untitled Diagram (1)

Footnotes

  1. 'blacK'.toLowerCase() === 'black' but K isn't actually an upper case k. It is a different unicode char that is equivelant to an upper case k in certain locales.

@romainmenke romainmenke changed the title css-color-parser css-color-parser + postcss-color-mix-function Mar 17, 2023
Copy link
Member

@Antonio-Laguna Antonio-Laguna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great!

I had to review this on the editor since this is a huge change and makes the browser suffer a lot.

This is so great to have it finally there! I'm really looking forward to this getting merged and out in the wild.

Thanks for all the work and the changes around the tooling and the other color functions!

@romainmenke
Copy link
Member Author

Thank you for working through this massive review 🙇
Yeah will be awesome to get this out there!

@romainmenke romainmenke merged commit cc433e2 into main Mar 22, 2023
7 checks passed
@romainmenke romainmenke deleted the css-color-parser--generous-aye-aye-679d05f6e2 branch March 22, 2023 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment