W3C home > Mailing lists > Public > www-style@w3.org > October 2016

Re: [css3-selectors]: Proposal: Adop the ::wrap pseudo element

From: Florian Rivoal <florian@rivoal.net>
Date: Wed, 19 Oct 2016 11:56:16 +0900
Cc: CSS public list <www-style@w3.org>
Message-Id: <A9E304F0-5278-414B-AB82-168FB5433C32@rivoal.net>
To: Ian Yang <ian.html@gmail.com>

> On Oct 19, 2016, at 11:52, Ian Yang <ian.html@gmail.com> wrote:
> * How would a ::wrapper pseudo affect inheritance and cascading? The fact that this needs answers shows that it causes new difficulties, and which answers are more desirable are non-obvious. if a child of the wrapper has a property set to "inherit" or an inherited property without a specified value, does it get its value from the ::wrapper, or form the ::wrapper's parent? If an ::wrapper is introduced between a parent and a child element, do the child still count as a child of the original parent for selector matching purpose, or is it now a grand child and ::wrapper is the parent? ...
> I would let W3C to define the spec if one day ::wrap is adopted. But I personally think ::wrapper should become the new parent and the former children becomes grand children.

That's the problem though. You are right, this is the more useful answer. But this is also unlike everything else in CSS. Selector matching is not influenced by styling at the moment. This would mean that we would have to change that.

I don't know whether that makes it impossible or not, but at the very least it breaks all sorts of assumptions in current browsers, making it a hard problem.

 - Florian
Received on Wednesday, 19 October 2016 02:56:46 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:15:01 UTC