Re: A *:body pseudo class

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