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:44:21 +0900
Cc: CSS public list <www-style@w3.org>
Message-Id: <491E995C-667E-4A07-B2FC-1FBB86C75C32@rivoal.net>
To: Ian Yang <ian.html@gmail.com>

> On Oct 19, 2016, at 11:28, Ian Yang <ian.html@gmail.com> wrote:
> Thanks Florian Rivoal. Could you please let us know of which browser you are currently an implementor, and the technical reason that you regard ::wrap as hard to implement? 

Hi, I don't represent a browser, but I do speak for Vivliostyle, which is a non-browser CSS UA (focused on pagination and print).

Other people are more qualified than me to speak about this, but here's a quick attempt at showing some of what makes this hard:

* I plays poorly with how browser internals work currently. In vastly simplified terms, browsers work by starting with a DOM tree, compute styles on it to convert it into a box tree, then compute layout on that to convert into a display list. Pseudo elements are not in the DOM tree, but cause boxes to exist, and that's tricky to handle, especially when performance matters. It is already a non trivial issue for the existing pseudo elements like ::before and ::after, but the ::wrapper pseudo goes in the middle of the tree, not at the leaves, and that makes it harder.

* ::first-line and ::first letter also go somewhere else than the leaves, and they're considered hard problems that don't work well. And even then, the set of properties that apply to them is limited.

* 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? ...

 - Florian
Received on Wednesday, 19 October 2016 02:44:48 UTC

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