From 655ed38c6cd53a19c6ba1ebab5f2429441b99a58 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Tue, 5 Apr 2022 23:10:44 +0200 Subject: chore: add a List component --- src/components/atoms/lists/list.module.scss | 39 +++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/components/atoms/lists/list.module.scss (limited to 'src/components/atoms/lists/list.module.scss') diff --git a/src/components/atoms/lists/list.module.scss b/src/components/atoms/lists/list.module.scss new file mode 100644 index 0000000..c6fbf53 --- /dev/null +++ b/src/components/atoms/lists/list.module.scss @@ -0,0 +1,39 @@ +.list { + margin: 0; + + ::marker { + color: var(--color-primary-dark); + } + + & & { + margin-top: var(--spacing-2xs); + } + + &__item { + &:not(:last-child) { + margin-bottom: var(--spacing-2xs); + } + } + + &--ordered { + padding: 0; + counter-reset: li; + list-style-type: none; + } + + &--ordered &__item { + display: table; + counter-increment: li; + + &::before { + content: counters(li, ".") ". "; + display: table-cell; + padding-right: var(--spacing-2xs); + color: var(--color-secondary); + } + } + + &--unordered { + padding: 0 0 0 var(--spacing-sm); + } +} -- cgit v1.2.3