Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Color processing steps are incorrect #760
Assuming the input is Unicode (with bytes you’d first decode to Unicode), parsing should go something like:
Perhaps css-syntax should have better “glue” algorithms for putting these three steps together. https://drafts.csswg.org/css-syntax/#parse-grammar says it can take a string as input, but when following steps we then get to “from the list of tokens produced by the tokenizer” without further links or info about how to make a tokenizer.
The first three steps are all covered by just calling CSS/parse with a string. The end result is a
(Like, if this kind of thing might be done elsewhere, it might be useful for CSS Color to go ahead and define a grammar nonterminal just for "canonicalizable to RGBA without outside information" colors, so you can just parse to that.)
You might be missing this introductory text from 5.3, which applies to all of the algorithms:
Does that answer your question? If not, what exactly do you think is missing?