- From: Simon Sapin <simon.sapin@exyr.org>
- Date: Sat, 01 Feb 2014 23:58:17 +0100
- 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