W3C home > Mailing lists > Public > public-css-archive@w3.org > July 2021

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

From: Delan Azabani via GitHub <sysbot+gh@w3.org>
Date: Tue, 27 Jul 2021 15:45:45 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-887624094-1627400743-sysbot+gh@w3.org>
Thanks @fantasai + @frivoal for the thorough answers! So to remind myself when I get back into my impl work:

1. either could be ok, or maybe used value
2. color and background-color
3. ::selection only (for now)
4. color and background-color
5. cascaded value exists, and its origin was not the user agent (or maybe just author)
6. unset truly erases, rather than yielding an inherit/initial “specified by the author”
7. unset truly erases, so it should always be like inherit here, not like initial

I’ve just realised that there’s a third origin between author and UA: the user origin. While it *might* be possible to extend paired cascade so that it applies to both legs of the cascade (UA-to-user and user-to-author), what I’ve seen of Blink’s impl makes me instead prefer to change “specified by the author” to “specified by other origins”. I think this would also make revert behave more consistently with the idea of rolling back the cascade.

> If you and @emilio both think it should be extended to ::target-text, we can consider it.

I can’t speak for Emilio, but I’m leaning slightly towards extending it to all highlights. To me it depends on which inconsistency will annoy authors more: all highlights (effectively ::selection and ::target-text with typical UA defaults) having paired cascade but nothing else, or ::selection having paired cascade but nothing else.

The impl for Blink won’t be much harder either way, and while the rule itself provides a non-zero benefit (making it harder to accidentally create illegible highlight colors), I think I’m not alone in saying that the benefit wouldn’t have been big enough for us to put this in the spec if it weren’t for compat.

So yeah, I would say extend it?

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 27 July 2021 15:45:46 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:39 UTC