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

2016-10-02 23:36 GMT+08:00 Ian Yang <ian.html@gmail.com>:

> 2016-09-29 15:33 GMT+08:00 Christoph Päper <christoph.paeper@crissov.de>:
>
>> fantasai <fantasai.lists@inkedblade.net>:
>> >
>> > 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. ;)
>>
>> You’d need to convince Hixie et al., though.
>>
>> <https://wiki.whatwg.org/wiki/Rationale#Why_isn.E2.80.99t_th
>> ere_a_grouping-type_element_for_description_lists_to_represe
>> nt_individual_name-value_groups_.28e.g..2C_a_.E2.80.
>> 9Cdli.E2.80.9D_element.29.3F_It_would_make_styling_as_well_
>> as_adding_microdata_to_individual_groups_much_easier..5B32.5D>
>> <https://wiki.whatwg.org/wiki/FAQ#HTML_should_group_.3Cdt.3E
>> s_and_.3Cdd.3Es_together_in_.3Cdi.3Es.21>
>>
>> This FAQ says:
>>
>> > This is a styling problem and should be fixed in CSS. There's no reason
>> to add a grouping element to HTML, as the semantics are already unambiguous.
>>
>>
> Thanks everyone for your precious opinion. And thanks Christoph for
> letting us know that Ian Hixie and so on think it is CSS's responsibility
> to introduce the wrapper.
>
> So could we now make up our minds to start to accept the proposed pseudo
> element?
>


Any advice, please? Personally, I hope this pseudo element could be adopted
as early as possible. It's not like developers can use it right away once
it is adopted because it takes time for major browsers to implement it.

This pseudo element can do a lot more than just wrapping <dt> and <dd>
pairs. For years, we have been adding extra <div>s or <span>s into our HTML
codes just because we have to achieve a certain layout or positioning. With
::wrap pseudo element, we can say good bye to that inflexible approach and
styling or redesigning web pages would become impressively flexible and
time-saving. I really don't see any reason not to welcome it and see it
joins the CSS family.

Received on Thursday, 6 October 2016 08:46:13 UTC