From aa93f96658b4aded48c9c3c71f1ebe2608212cfa Mon Sep 17 00:00:00 2001 From: tdro Date: Thu, 18 May 2023 08:12:04 -0400 Subject: assets/css/default: Support start on ordered lists Account for larger numbers. Some browsers may count from 0 or 1.. --- assets/css/default.css | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) (limited to 'assets') diff --git a/assets/css/default.css b/assets/css/default.css index 4d7aef2..ca39174 100644 --- a/assets/css/default.css +++ b/assets/css/default.css @@ -432,29 +432,45 @@ textarea { } ol { - counter-reset: ol; padding-left: 3.5rem; + list-style: none; } ol li { overflow-wrap: break-word; word-break: break-word; - list-style: none; + position: relative; +} + +ol li + li { + margin-top: 0.5rem; } ol li:before { - border-radius: 100%; + border-radius: 0.5rem; border: 1px solid; - content: counter(ol); - counter-increment: ol; - margin-left: -2rem; + border-color: #111; + border-color: var(--foreground); font-size: 85%; - padding: 0 0.35rem; + padding: 0 0.5rem; position: absolute; + right: 0; + margin-right: 100%; + margin-left: -100%; + font-variant-numeric: tabular-nums lining-nums slashed-zero; } -ol li + li { - margin-top: 0.5rem; +ol:not([start]) { + counter-reset: ol; +} + +ol:not([start]) li:before { + content: counter(ol); + counter-increment: ol; +} + +ol[start] li:before { + content: counter(list-item); } main { -- cgit v1.2.3