Re: [csswg-drafts] [css-pseudo] clarify paired-cascading behavior (#6386)

> > Run a search for "Firefox userContent.css".
> 
> Thanks! I’ll play around with the user origin, then see if I can make a case for one or the other.

So there’s no concept of user default highlight colors, only the UA has default highlight colors, and I don’t expect that to change. But the user stylesheet can set highlight colors, so the main question is, should user highlight colors suppress UA defaults?

If they don’t (as currently proposed), user styles can change one highlight color while leaving the other one as the default highlight color. This is how Firefox currently works. For example, if the default highlight colors are white on blue, and userContent.css says ::selection has a green background, an unstyled page would have white-on-green selections, not initial-on-green, because the default highlight foreground ‘color’ would not be suppressed.

If they do, user styles that change one highlight color will make the other one become initial. Using the example above (default white-on-blue, plus user background of green), an unstyled page would have initial-on-green (typically black-on-green), because the default white foreground ‘color’ would be suppressed.

I don’t really have an opinion on which of those behaviours is better.

However! Either way, setting either of the highlight colors in user styles “splits” paired cascade for authors. Using the example above (default white-on-blue, plus user background of green), if the author also only sets ‘background-color’, then ‘color’ is ‘initial’ as usual. But otherwise, ‘background-color’ is green, _regardless_ of whether the author sets ‘color’. This is again how Firefox currently works. This smells kinda awkward, but I’m not sure if it’s actually problematic.

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


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

Received on Wednesday, 8 December 2021 14:42:50 UTC