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

Re: A *:body pseudo class

From: Leif Halvard Silli <xn--mlform-iua@xn--mlform-iua.no>
Date: Sat, 1 Feb 2014 21:37:11 +0100
To: Steve Faulkner <faulkner.steve@gmail.com>
Cc: www-style@w3.org
Message-ID: <20140201213711757151.54396da5@xn--mlform-iua.no>
Steve Faulkner, Sat, 1 Feb 2014 19:20:04 +0000:

>>> This might well have been thought of already. But when designing/
>>> styling some HTML documents as a book, I found myself repeatedly
>>> adding div elements of the following kind:
>>> 
>>> <section>
>>>  <h1> Headding</h1>
>>>  <div class="body-text">
>>>    <p>Lorem
>>>    <p>Ipsum
>>>    <p>Dolor
>>>    <p>Sint
>>>  </div>
>>> </section>
>> 
>> I think you're looking for <main>:

>> […] There's an open bug on this.

> what you suggest is […] an abuse of the semantics

Indeed.

> 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.
-- 
leif halvard silli
Received on Saturday, 1 February 2014 20:37:45 UTC

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