Skip to content

Commit

Permalink
fix(list): left align numbers (#5100)
Browse files Browse the repository at this point in the history
  • Loading branch information
tw15egan authored and joshblack committed Jan 23, 2020
1 parent 4ec7fe5 commit d8aa52c
Showing 1 changed file with 15 additions and 2 deletions.
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

0 comments on commit d8aa52c

Please sign in to comment.