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

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

From: Marat Tanalin <mtanalin@yandex.ru>
Date: Wed, 28 Sep 2016 22:45:40 +0300
To: fantasai <fantasai.lists@inkedblade.net>, Ian Yang <ian.html@gmail.com>, "www-style@w3.org" <www-style@w3.org>
Message-Id: <251861475091940@web15o.yandex.ru>
28.09.2016, 21:46, "fantasai" <fantasai.lists@inkedblade.net>:
> On 09/28/2016 10:29 AM, Ian Yang wrote:
>>  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
> The wrapper element is useful for much more than just styling: it allows
> anchors to target the term-definition set,

An id could be assigned to the virtual-wrapper's first child element instead of the wrapper itself. From practical perspective, there is no crucial difference between

    <div id="example">


        <p id="example"></p>

> and JS to operate on it as a single element.

Operating on CSS-generated wrapper's contents could be possible just by providing an API e.g. to get all wrapper's contents as a DOM fragment (or as a DOM list or an array), e.g. `element.parentCSSWrapper.getContents()`, where `parentCSSWrapper` is similar to `parentNode`, just for CSS-generated wrappers.

Also, CSS wrappers would be much more flexible than hard-coded HTML wrappers in terms of ability to wrap _different_ elements e.g. depending on media queries.
Received on Wednesday, 28 September 2016 19:46:16 UTC

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