File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -1265,6 +1265,29 @@ Printing Counters: the ''counter()'' and ''counters()'' functions</h2>
12651265 </pre>
12661266 </div>
12671267
1268+ <div class=issue>
1269+ Counters are sometimes useful for things other than printing markers.
1270+ In general, they provide the ability to number elements in sequence,
1271+ which can be useful for other properties to reference.
1272+ For example, using 'order' to put an element between two other specific elements
1273+ currently requires you to explicitly put 'order' on every element before and/or after the desired insertion point.
1274+ If you can set the 'order' value of everything to a counter, tho,
1275+ you can more easily insert an element into an arbitrary spot between two others.
1276+
1277+ Other use-cases involve nested or sibling elements with transforms that are meant to be slightly different from each other.
1278+ Today you have to use a preprocessor to do this in a reasonable way,
1279+ but a counter would make it work well in "plain" CSS.
1280+
1281+ (You can built up successive values in the nested case today
1282+ by using <a>custom properties</a> and stacking up nested ''calc()'' s,
1283+ but this is a *little bit* clumsy,
1284+ and doesn't work for siblings.)
1285+
1286+ Suggestion is to add a <css> counter-value(<<ident>> )</css> function,
1287+ which returns the value of the named counter as an integer,
1288+ rather than returning a string.
1289+ </div>
1290+
12681291
12691292
12701293<h2 id='ua-stylesheet'>
You can’t perform that action at this time.
0 commit comments