@@ -1275,15 +1275,13 @@ <h2 id=symbols-function><span class=secno>4. </span> Defining Anonymous
1275
1275
Counter Styles: the ‘< a href ="#descdef-symbols "> < code
1276
1276
class =css > symbols()</ code > </ a > ’ function</ h2 >
1277
1277
1278
- < p > The previous chapter specified a way to define custom counter styles.
1279
- However, counter styles are sometimes used only once in a stylesheet, and
1278
+ < p > The ‘< a href ="#descdef-symbols "> < code
1279
+ class =css > symbols()</ code > </ a > ’ function allows a < a
1280
+ href ="#counter-style "> < i > counter style</ i > </ a > to be defined inline in a
1281
+ property value, for when a style is used only once in a stylesheet and
1280
1282
defining a full ‘< a href ="#at-counter-style "> < code
1281
- class =css > @counter-style</ code > </ a > ’ rule can be overkill for this case
1282
- (not to mention the possibility of unintentional name collisions). To
1283
- address this case, the ‘< a href ="#descdef-symbols "> < code
1284
- class =css > symbols()</ code > </ a > ’ function provides a simple way to define
1285
- an anonymous counter style as an inline value. It does not provide the
1286
- full feature-set of the ‘< a href ="#at-counter-style "> < code
1283
+ class =css > @counter-style</ code > </ a > ’ rule would be overkill. It does not
1284
+ provide the full feature-set of the ‘< a href ="#at-counter-style "> < code
1287
1285
class =css > @counter-style</ code > </ a > ’ rule, but provides a sufficient
1288
1286
subset to still be useful. The syntax of the ‘< a
1289
1287
href ="#descdef-symbols "> < code class =css > symbols()</ code > </ a > ’ rule is:
@@ -1304,20 +1302,20 @@ <h2 id=symbols-function><span class=secno>4. </span> Defining Anonymous
1304
1302
href ="#prefix "> < i title =counter-prefix > prefix</ i > </ a > and < a
1305
1303
href ="#suffix "> < i title =counter-suffix > suffix</ i > </ a > of ‘< code
1306
1304
class =css > ""</ code > ’ (the empty string), a < a href ="#range "> < i
1307
- title =counter-range > range</ i > </ a > from negative infinity to positive
1308
- infinity, n < a href ="#fallback-style "> < i title =counter-fallback > fallback
1309
- style</ i > </ a > of ‘< a href ="#decimal "> < code
1310
- class =css > decimal</ code > </ a > ’, and a < a href ="#negative-sign "> < i
1311
- title =counter-negative > negative sign</ i > </ a > of "\2D" ("-" hyphen-minus).
1312
- The counter style's < a href ="#algorithm "> < i
1305
+ title =counter-range > range</ i > </ a > of ‘< code class =css > auto</ code > ’, a
1306
+ < a href ="#fallback-style "> < i title =counter-fallback > fallback style</ i > </ a >
1307
+ of ‘< a href ="#decimal "> < code class =css > decimal</ code > </ a > ’, and a < a
1308
+ href ="#negative-sign "> < i title =counter-negative > negative sign</ i > </ a > of
1309
+ "\2D" ("-" hyphen-minus). The counter style's < a href ="#algorithm "> < i
1313
1310
title =counter-algorithm > algorithm</ i > </ a > is constructed by consulting the
1314
- previous chapter using the provided type - or ‘< a href ="#symbolic "> < code
1315
- class =css > symbolic</ code > </ a > ’ if the type was omitted - and the
1316
- provided <string> s and <image> s as the value of the ‘< a
1317
- href ="#descdef-symbols "> < code class =property > symbols</ code > </ a > ’
1318
- property. If the type is ‘< a href ="#fixed "> < code
1319
- class =css > fixed</ code > </ a > ’, the < a href ="#first-symbol-value "> < i > first
1320
- symbol value</ i > </ a > is ‘< code class =css > 1</ code > ’.
1311
+ previous chapter using the provided type — or ‘< a
1312
+ href ="#symbolic "> < code class =css > symbolic</ code > </ a > ’ if the type was
1313
+ omitted — and the provided <string> s and <image> s as the value of
1314
+ the ‘< a href ="#descdef-symbols "> < code
1315
+ class =property > symbols</ code > </ a > ’ property. If the type is ‘< a
1316
+ href ="#fixed "> < code class =css > fixed</ code > </ a > ’, the < a
1317
+ href ="#first-symbol-value "> < i > first symbol value</ i > </ a > is ‘< code
1318
+ class =css > 1</ code > ’.
1321
1319
1322
1320
< div class =example >
1323
1321
< p > This code:
@@ -1337,7 +1335,7 @@ <h2 id=symbols-function><span class=secno>4. </span> Defining Anonymous
1337
1335
1338
1336
< p > On the other hand, specifying the type of counter, like so:
1339
1337
1340
- < pre > ol { list-style: symbols(repeating "*" "\2020" "\2021" "\A7"); }</ pre >
1338
+ < pre > ol { list-style: symbols(cyclic "*" "\2020" "\2021" "\A7"); }</ pre >
1341
1339
1342
1340
< p > will produce lists that look like:
1343
1341
0 commit comments