[csswg-drafts] [css-pseudo] should all highlights have paired defaults? (#7837)

delan has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-pseudo] should all highlights have paired defaults? ==
#6386 asked a bunch of questions about paired defaults, which is the compat behaviour where the UA default ::selection ‘color’ and ‘background-color’ (‘HighlightText’ and ‘Highlight’) are only used when neither were set by the author.

Question 3 asks whether this should apply to the other highlights too, and this issue is meant to resolve that question. Currently ::target-text is the only pseudo with defaults for those properties (‘MarkText’ and ‘Mark’), so it’s the only pseudo affected by this issue.

One reason to say no is that ::target-text doesn’t have the legacy of ::selection that made this rule necessary. One reason to say yes is consistency, since the highlights are already a complicated enough pile of exceptions without adding an exception for just one of them. Another is that the behaviour can be useful for the same reasons it is for ::selection, that is, avoiding situations where the author setting only one of the properties yields an illegible result in another browser with different defaults.

(see also: [fantasai’s comment](https://github.com/w3c/csswg-drafts/issues/6386#issuecomment-886111107), [my comment](https://github.com/w3c/csswg-drafts/issues/6386#issuecomment-887624094), [emilio’s comment](https://github.com/w3c/csswg-drafts/issues/6386#issuecomment-908315479))

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7837 using your GitHub account


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

Received on Thursday, 6 October 2022 09:20:01 UTC