Conversation
cderv
left a comment
There was a problem hiding this comment.
I added a simple test for now just about the presence of the warning so we don't lose it in the future.
Testing for the revealjs error seems odd as it happens only in a specific case with background-color
I'll also improve printMessage verify function in another PR so we can test multiple regexes.
I'll modify this test there so that we test also for no warn on some known color.
| if (name.startsWith("#")) return true; | ||
| if (name.startsWith("rgb")) return true; | ||
| if (name.startsWith("hsl")) return true; | ||
| if (name.startsWith("hwb")) return true; |
There was a problem hiding this comment.
There are a lot more color spaces than this, but this should be fine.
| "white", | ||
| "whitesmoke", | ||
| "yellow", | ||
| "yellowgreen", |
There was a problem hiding this comment.
Yes, looks the same as the named colors in typst_css.lua.
transparent is also important, once a keyword, now a color
I see both of us missed rebeccapurple, the other color defined after the original spec.
Closes #11665.
(@gordonwoodhull, I'm asking for a review from you because I think you've written CSS color detectors in your typst work. I'd love to know if we're missing anything with
isCssColorNamespecifically. Thanks!)