From d36f6baf06fdbde91caedb796538f5c7ab0717bc Mon Sep 17 00:00:00 2001 From: TJ Egan Date: Mon, 20 Jan 2020 18:45:26 -0800 Subject: [PATCH] fix(list): left align numbers (#5100) --- .../components/src/components/list/_list.scss | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/packages/components/src/components/list/_list.scss b/packages/components/src/components/list/_list.scss index 047323e410a8..e53a2612b05b 100644 --- a/packages/components/src/components/list/_list.scss +++ b/packages/components/src/components/list/_list.scss @@ -46,8 +46,21 @@ margin-top: 0; } - .#{$prefix}--list--ordered { - list-style-type: decimal; + .#{$prefix}--list--ordered:not(.#{$prefix}--list--nested) { + counter-reset: item; + } + + .#{$prefix}--list--ordered:not(.#{$prefix}--list--nested) + > .#{$prefix}--list__item { + position: relative; + } + + .#{$prefix}--list--ordered:not(.#{$prefix}--list--nested) + > .#{$prefix}--list__item::before { + content: counter(item) '.'; + counter-increment: item; + position: absolute; + left: rem(-24px); } .#{$prefix}--list--ordered.#{$prefix}--list--nested {