W3C home > Mailing lists > Public > www-style@w3.org > May 1998

Errors in section 12 (generated content)

From: Ian Hickson <exxieh@bath.ac.uk>
Date: Sun, 3 May 1998 16:58:08 +0100
Message-ID: <000601bd76b5$13e254c0$ca20268a@hpxu>
To: www-style@w3.org
Here is a list of errors and typos in section 12
(http://www.w3.org/TR/PR-CSS2/generate.html) of the proposed recommendation.
Oh, and at the bottom is an idea for CSS3.


From section 12.1:
>P.note:before { content: "Note: ";
>                border: solid green}
>would cause a solid green border to be rendered
>around the entire paragraph, including the initial string.

I disagree. To get the effect described one would use

P.note:before { content: "Note: "; }
P.note        { border: solid green; }


Row 4 of the table above 12.4.2
There is a "<" in the source which should be 'escaped' as &lt;


The comment above 12.5.1 illustrates a major drawback of the counter
scheme - what if you do not control all of the stylesheets? Is there a way
around this? (I can't think of one offhand)

The comment in question is:
> The 'counter-reset' property follows the cascading
> rules. Thus, due to cascading, the following stylesheet:
> H1 {counter-reset: section -1}
> H1 {counter-reset: imagenum 99}
> will only reset 'imagenum'. To reset both counters,
> they have to be specified together:
> H1 {counter-reset: section -1 imagenum 99}


The second example in section 12.4 has the rather exotic style sheet:
> LI:before

>               display: marker;
>               content: "(" numeric(counter) ")";
>               width: 6em;
>               text-align: center;
>           }
...which should actually be:

               display: marker;
               content: "(" counter(counter) ")";
               counter-increment: counter;
               width: 6em;
               text-align: center;


The fourth example also uses the mysterious "numeric()" function (which
should be changed to counter()).


Will CSS3 offer a way of refering to another elements counter?

I need to mention an image's caption. This is how I would mark it up (I've
used an imaginary XML language since I can't see of any way of doing this in

<IMG SRC="apicture.png" ID=thepic/>
Here we discuss the points raised in <REF REFID=thepic/>. There is nothing
special to mention.

Using the following style sheet:

PARA { display: block; }

IMG { float: left; background: attr(SRC);
      counter-increment: figures;
      padding: 10px; }
IMG[SRC=apicture.png] { width: 200px; height: 200px; }
IMG:before { content: "Fig " counter(figures); }

REF:before { content: "figure " proxycounter(attr(REFID), figures); }

/* proxycounter is the only addition here, all the rest is valid with
CSS2-PR */

Would hopefully make something looking like:

+--------+ Here we
|*Fig 1 *| discuss
|***    *| the points
|****  **| raised in
|********| figure 1.
+--------+ There is
 nothing special to


Ian Hickson
Version: 3.12   Info: www.geekcode.com
GIT/M/S d->-- s+: a--->? C++(+++)>$ U>*++++ P L+>+++++ E(+)>+++ W+++ N(+) o?
K? w@ O- !M V- PS+ PE- Y+ PGP>+ t 5+++>++++ X- R+(+++) tv b++(+++) DI++
D++(---)>++++ G>+++ e(*)>+++++ h!()(--) !r y?
Received on Sunday, 3 May 1998 13:01:42 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:26:47 UTC