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

Color function lch() (and probably lab() too) are missing whitespace in space separated values #209

Open
zachleat opened this issue Nov 29, 2022 · 2 comments

Comments

@zachleat
Copy link

https://caniuse.com/css-lch-lab

div { color: lch(67.5345% 42.5 258.2); }

Returns:

div { color: lch(67.5345%42.5 258.2); }

Notably, comma separated values for these functions are invalid.

@zachleat
Copy link
Author

Discovered in 11ty/webc#82

@lahmatiy
Copy link
Member

From parser's perspective that's not a bug, since can be parsed correctly by any modern browser. Currently a generator emits a whitespace between tokens only when they will produce an another token otherwise. For instance, a whitespace between <ident-token> and <(-token> is required because they will become a single <function-token> otherwise. On other hand, a whitespace between <delim-token> (%) and <number-token> is not needed, since such tokens don't produce an another token.
I guess, you are looking for pretty print serialization. However, it's not implemented yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants