Re: [css-gcpm] Idea for example 18

Also sprach Tab Atkins Jr.:

 > > target-counters() could be used to create a reference to the numbering
 > > inside a multilevel list, which can use counters(). I'll keep trying to
 > > think of a semi-realistic example for that.
 > 
 > If you're using nested sections, you can set the counters on the
 > sections themselves, rather than the headings.  That way you get the
 > nesting structure automatically, without having to do the six
 > separately-managed counters.

Yes, or in combination with <header>:

  header:first-of-type { counter-reset: s }
  header { counter-increment: s }
  header:before { content: "Section " counters(s,".") ": " }

  <section>
    <header>Europe</header>
      <section>
        <header>San Marino</header>
        <header>Monaco</header>
      </section>
    </header>
  </section>

-h&kon
              Håkon Wium Lie                          CTO °þe®ª
howcome@opera.com                  http://people.opera.com/howcome

Received on Friday, 13 June 2014 15:32:02 UTC