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

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

From: fantasai <fantasai.lists@inkedblade.net>
Date: Wed, 28 Sep 2016 14:42:54 -0400
To: Ian Yang <ian.html@gmail.com>, www-style@w3.org
Message-ID: <8de30eff-c8c5-07fb-33cb-bec00621c242@inkedblade.net>
On 09/28/2016 10:29 AM, Ian Yang wrote:
> Hi everyone,
>
> This letter to genuinely suggest that the ::wrap pseudo element be formally adopted. Please find its information in the
> following url address.
>
> https://wiki.csswg.org/ideas/pseudo-elements#complex-wrapping-of-selector-range
>
> There are too many use cases of description list (<dl>) nowadays. However, it has long been a headache of mine that there is
> no wrapper element for wrapping <dt> and <dd> pairs. Therefore I have had no choice but to resort to JavaScript to insert <li
> role="presentation"></li> into <dl>.

While I totally agree with you on this, I believe this is a bug in HTML and not
in CSS. The wrapper element is useful for much more than just styling: it allows
anchors to target the term-definition set, and JS to operate on it as a single
element.

(Also from a practical point of view, I get the impression from implementers that
it is much easier to implement parsing of a new HTML element than to implement a
new CSS pseudo-class that warps the element tree, so if one of your motivations
for trying to solve the problem in CSS instead of HTML is speed-to-market...
you're targetting the wrong place. ;)

~fantasai
Received on Wednesday, 28 September 2016 18:43:27 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:09:04 UTC