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

Re: A *:body pseudo class

From: Simon Sapin <simon.sapin@exyr.org>
Date: Sat, 01 Feb 2014 23:58:17 +0100
Message-ID: <52ED7C09.7080302@exyr.org>
To: Leif Halvard Silli <xn--mlform-iua@xn--mlform-iua.no>, Steve Faulkner <faulkner.steve@gmail.com>
CC: www-style@w3.org
On 01/02/2014 21:37, Leif Halvard Silli wrote:
>> if not using an element but being able to style content other than the
>> heading,  is the desired outcome
>>
>> section :not(h1) { }
>>
>> would work to select content in a section that is not the heading.
> It would not help in my case, as I want to be able to add a border
> around the non-heading content. For that I need a wrapper - in the form
> of an element or in the form of a pseudo-element.

That means that you’re looking not just to style existing content, but 
to create a wrapper box. So this would not be a pseudo-class (which a 
boolean test on DOM elements) but a pseudo-element.

We’ve had proposals to do more complex box generation than ::before and 
::after in CSS, but none of them has gotten traction so far. For example:

http://www.w3.org/TR/2003/WD-css3-content-20030514/#pseudo-elements

This may be something we revisit in the future, but it is more complex 
than you seem to realize.

-- 
Simon Sapin
Received on Saturday, 1 February 2014 22:58:45 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:18 UTC