W3C home > Mailing lists > Public > www-style@w3.org > January 2014

Re: A *:body pseudo class

From: Antony Kennedy <antony@silversquid.com>
Date: Fri, 31 Jan 2014 15:11:15 +0000
Cc: Matthew Robb <matthewwrobb@gmail.com>, www-style list <www-style@w3.org>
Message-id: <5D973835-A2E6-4C44-95D5-83E6793EE09F@silversquid.com>
To: Leif Halvard Silli <xn--mlform-iua@xn--mlform-iua.no>

Ive often thought that ::surround and ::contain as pseudo-elements would be useful.

i.e. ::surround would (effectively) change:




and ::contain would (effectively) change:




This would enable us to take all those crufty divs and spans that we just need for presentational hooks, and move them into the presentation layer where they belong.

Is there already something to achieve this that Im unaware of? Thoughts?


On 31 Jan 2014, at 07:18, Leif Halvard Silli <xn--mlform-iua@xn--mlform-iua.no> wrote:

> Matthew Robb, Thu, 30 Jan 2014 22:21:13 -0800:
>> Why not do something like this as a pseudo-element that works like ::before
>> and ::after but more like ::wrap ?
>> On Thu, Jan 30, 2014 at 9:39 PM, Leif Halvard Silli wrote:
>>> Leif Halvard Silli, Fri, 31 Jan 2014 06:35:32 +0100:
>>>> Given that it ought to be a universal pattern that body text follows
>>>> *after* headings, I am hereby proposing a *:body pseudo class.
>>> Or, to shed some bike on the issue: *:body-text, so as to avoid linking
>>> it to the body element.
> Hi Matthew. May be a pseudo-element, and not a pseudo-class, is what is 
> needed. However, I actually think *not*. 
> I think psudo-*class* is what we should have. Because, a pseudo element 
> is placed at the start or at the end of an element. But I propose 
> something that encapsulate the entire "body text". Thus, a selector to 
> match content that is *already there*. And not a selector to *add* any 
> new content.
> Leif Halvard Silli
Received on Friday, 31 January 2014 15:11:53 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:39 UTC