Re: [csswg-drafts] [css-pseudo] highlights and color:currentColor (#6818)

> If you mean the first, maybe @fantasai or @frivoal can comment on the intent behind color:currentColor, and whether we really need it (or can provide it some other way).

I remembered the use case this was important for btw! With ::spelling-error and ::grammar-error, typical styles are to add a red or green squiggly line without changing the background or foreground color. The former is trivial (initial/transparent), but the latter needs some way of grabbing the ‘color’ that would have been used prior to the highlight, otherwise every misspelled word would become initial/black (#6779).

> The [language about `currentColor` in CSS Pseudo](https://drafts.csswg.org/css-pseudo-4/#highlight-text) is odd indeed and makes `currentColor` even more complex than it already is.

I agree, though I fear this might end up being the least complicated way to solve that problem.

> (As an aside, why is CSS Pseudo 4 linking to CSS Color 3 for the color definitions?)

No idea personally… I’m not yet familiar with our conventions around spec levels. Should we link to level 4 or 5?

-- 
GitHub Notification of comment by delan
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6818#issuecomment-994315221 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 15 December 2021 05:51:44 UTC