Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(list): left align numbers #5100

Merged
merged 9 commits into from
Jan 21, 2020
17 changes: 15 additions & 2 deletions packages/components/src/components/list/_list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down