From 7c216f121ac4e1eba25c8867785a5b08a69806c6 Mon Sep 17 00:00:00 2001 From: FearGoidte Date: Sat, 2 Apr 2016 21:53:55 +0100 Subject: [PATCH] Counter reset on ol too broad in scope MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reseting counters on the “ol” element means that an ordered list which is the descendent of a sibling element of a previous ordered list will behave as a continuation of the previous list. --- css2/generate.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/css2/generate.html b/css2/generate.html index 9e398c3aa96..dcfad9b090c 100644 --- a/css2/generate.html +++ b/css2/generate.html @@ -647,7 +647,7 @@

12.4.1 Nested counters and scope

'list-style: inside' on the LI element:
-OL { counter-reset: item }
+OL>LI:first-child { counter-reset: item }
 LI { display: block }
 LI:before { content: counter(item) ". "; counter-increment: item }
 
@@ -735,7 +735,7 @@

12.4.1 Nested counters and scope

as "1", "1.1", "1.1.1", etc.
-OL { counter-reset: item }
+OL>LI:first-child { counter-reset: item }
 LI { display: block }
 LI:before { content: counters(item, ".") " "; counter-increment: item }