Commit 8396571
Changed files (1)
src
styles
article
src/styles/article/list.css
@@ -51,7 +51,25 @@ ol:not([role="doc-toc"] *) > li {
@apply pl-[2em];
&::before {
+ /* `list-item` is an internal counter of Browser */
+ /* See https://developer.mozilla.org/en-US/docs/Web/CSS/Guides/Counter_styles/Using_counters#list_item_counters */
content: counter(list-item) ". ";
@apply absolute left-0 text-right w-[1.5em];
}
}
+
+/* For Chromium */
+@supports (x: attr(x number)) {
+ ol {
+ counter-reset: list-item;
+
+ > li {
+ &:not([value]) {
+ counter-increment: list-item;
+ }
+ &[value] {
+ counter-set: list-item attr(value number);
+ }
+ }
+ }
+}