From db29a9ec0d2ea527ae3b0adbebdaff0a38373c20 Mon Sep 17 00:00:00 2001 From: Tim MacDonald Date: Tue, 27 Aug 2024 16:24:09 +1000 Subject: [PATCH] Style ordered lists --- resources/css/_docs.css | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/resources/css/_docs.css b/resources/css/_docs.css index 42df4243..d26cf2fa 100644 --- a/resources/css/_docs.css +++ b/resources/css/_docs.css @@ -106,7 +106,10 @@ } } - ul:not(:first-of-type), .content-list ul { + ul:not(:first-of-type), + .content-list ul, + ol { + counter-reset: ordered-list; list-style-type: none; margin: 0 0 2.5em 0; padding: 0; @@ -126,17 +129,31 @@ code { font-size: .875em; } - - &::before { - content: ""; - position: absolute; - top: .40em; left: 0; - width: 9px; height: 10px; - background: url(/img/icons/ul_marker.min.svg) no-repeat center; - background-size: contain; - } } } + + ul:not(:first-of-type) li::before, + .content-list ul li::before { + content: ""; + position: absolute; + top: .40em; + left: 0; + width: 9px; + height: 10px; + background: url(/img/icons/ul_marker.min.svg) no-repeat center; + background-size: contain; + } + + ol li::before { + font-variant-numeric: tabular-nums; + position: absolute; + top: 0; + left: 0; + counter-increment: ordered-list; + content: counter(ordered-list) ". "; + background-image: none; + color: #FF2D20; + } } .docs_main h1 + ul {