Skip to content

Commit f9b261f

Browse files
authoredJan 18, 2021
EXM-47135 Fix list start range and ol enum value
1 parent 4aa2286 commit f9b261f

File tree

1 file changed

+33
-5
lines changed

1 file changed

+33
-5
lines changed
 

‎daisy/dtbook.2005.basic.css

+33-5
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ book {
9797
display: block;
9898
background-color: rgb(255,255,255);
9999
color: rgb(0,0,0);
100-
font-family: arial, verdana, sans-serif;
101100
line-height: 1.5em;
102101
margin-top: 4em;
103102
margin-bottom: 2em;
@@ -384,7 +383,7 @@ dfn {
384383

385384
code {
386385
display: inline;
387-
font-family: courier, verdana, arial, sans-serif;
386+
font-family: monospace;
388387
}
389388

390389
samp {
@@ -472,15 +471,15 @@ list[type="ol"][enum="a"] {
472471
list-style-type: lower-alpha;
473472
}
474473

475-
list[type="ol"][enum="U"] {
474+
list[type="ol"][enum="A"] {
476475
list-style-type: upper-alpha;
477476
}
478477

479478
list[type="ol"][enum="i"] {
480479
list-style-type: lower-roman;
481480
}
482481

483-
list[type="ol"][enum="X"] {
482+
list[type="ol"][enum="I"] {
484483
list-style-type: upper-roman;
485484
}
486485

@@ -505,6 +504,35 @@ list > li > list, list li list {
505504
margin-bottom: 0em;
506505
}
507506

507+
/*
508+
Take into account the @start attribute, use manual counters.
509+
Use list-item::marker to keep lists aligned.
510+
*/
511+
list[start]{
512+
counter-reset: item-count oxy_subtract(attr(start), 1, integer);
513+
}
514+
515+
list[start] > li::marker{
516+
counter-increment: item-count;
517+
content: counters(item-count, ".", decimal) ". ";
518+
}
519+
520+
list[start][enum=a] > li::marker{
521+
content: counters(item-count, ".", lower-alpha) ". ";
522+
}
523+
524+
list[start][enum=A] > li::marker{
525+
content: counters(item-count, ".", upper-alpha) ". ";
526+
}
527+
528+
list[start][enum=i] > li::marker{
529+
content: counters(item-count, ".", lower-roman) ". ";
530+
}
531+
532+
list[start][enum=I] > li::marker{
533+
content: counters(item-count, ".", upper-roman) ". ";
534+
}
535+
508536
/* ------------------------------------------------------------- */
509537
/* definition list */
510538
/* ------------------------------------------------------------- */
@@ -608,4 +636,4 @@ imggroup > caption {
608636
font-size: 80%;
609637
}
610638

611-
639+

0 commit comments

Comments
 (0)
Please sign in to comment.