counter-002.html (1099B)
1 <!doctype html> 2 <title>CSS Lists and Counters: counter(c, ".", lower-roman)</title> 3 <link rel="help" href="https://drafts.csswg.org/css-lists/#inheriting-counters"> 4 <link rel="match" href="counter-002-ref.html"> 5 <meta name="assert" content="counters are not inherited from the previous sibling, when can be inherited from the ancestor"> 6 <style type="text/css"> 7 #test { counter-reset: c; } 8 #test span { counter-increment: c; } 9 #test span::before { content: counter(c, lower-roman); } 10 </style> 11 <p>The following two lines should look the same:</p> 12 <div id="test"> 13 <span></span> 14 <span></span> 15 <span></span> 16 <span></span> 17 <span></span> 18 <span></span> 19 <span></span> 20 <span></span> 21 <span></span> 22 <span></span> 23 <span></span> 24 <span></span> 25 <span style="counter-reset: c 48"></span> 26 <span></span> 27 <span style="counter-reset: c 388"></span> 28 <span></span> 29 <span style="counter-reset: c 3488"></span> 30 <span></span> 31 <span></span> 32 </div> 33 <div> 34 i 35 ii 36 iii 37 iv 38 v 39 vi 40 vii 41 viii 42 ix 43 x 44 xi 45 xii 46 xlix 47 xiii 48 ccclxxxix 49 xiv 50 mmmcdlxxxix 51 xv 52 xvi 53 </div>