diff --git a/preview/app/views/pages/index.html.erb b/preview/app/views/pages/index.html.erb index 61a797ca7..9343a4405 100644 --- a/preview/app/views/pages/index.html.erb +++ b/preview/app/views/pages/index.html.erb @@ -216,6 +216,8 @@

Lists

+

Note that lists support having li items and li items with children, while keeping the same margin (in these examples, the ordered list has paragraphs). +

Unordered

@@ -236,6 +238,26 @@

This is the following paragraph sed nisl id lectus scelerisque facilisis consectetur eget nisl. Morbi scelerisque felis vel ullamcorper viverra. In id ante quis quam sodales auctor in a ante. Maecenas faucibus, diam sit amet sollicitudin pellentesque, est nulla pellentesque sapien.

+
+

Ordered

+ +

This is the preceding paragraph sed nisl id lectus scelerisque facilisis consectetur eget nisl. Morbi scelerisque felis vel ullamcorper viverra. In id ante quis quam sodales auctor in a ante. Maecenas faucibus, diam sit amet sollicitudin pellentesque, est nulla pellentesque sapien.

+ +
    +
  1. Pellentesque consequat elit eget tristique sagittis. Etiam et erat et lorem elementum commodo. Aenean congue diam a nibh accumsan tincidunt.

    +
      +
    1. In id ante quis quam sodales auctor in a ante. Maecenas faucibus, diam sit amet sollicitudin pellentesque, est nulla pellentesque sapien. +

        +
      1. Etiam et erat et lorem elementum commodo.

      2. +
      +
    2. +
    +
  2. +
+ +

This is the following paragraph sed nisl id lectus scelerisque facilisis consectetur eget nisl. Morbi scelerisque felis vel ullamcorper viverra. In id ante quis quam sodales auctor in a ante. Maecenas faucibus, diam sit amet sollicitudin pellentesque, est nulla pellentesque sapien.

+
+

Unordered list with emphasis

diff --git a/src/core/styles/text.css b/src/core/styles/text.css index e2059615b..4c72bdda1 100644 --- a/src/core/styles/text.css +++ b/src/core/styles/text.css @@ -102,10 +102,24 @@ @apply list-disc ml-32 mb-24; } + .ui-ordered-list { + @apply text-p1 font-light text-cool-black; + @apply ml-32 mb-24 list-decimal; + } + + .ui-unordered-list li > *:last-of-type:not(ul):not(ol), + .ui-ordered-list li > *:last-of-type:not(ul):not(ol) { + margin-bottom: 0; + } + .ui-unordered-list ul { @apply ml-24 mt-16 list-circle; } + .ui-ordered-list ol { + @apply ml-24 mt-16 list-decimal; + } + .ui-unordered-list ul ul { @apply list-square; } @@ -125,11 +139,11 @@ .ui-unordered-list-with-emphasis ul { margin-top: calc(var(--spacing-16) + var(--spacing-8)); - @apply ml-24 list-disc; + @apply ml-24 list-circle; } .ui-unordered-list-with-emphasis ul ul { - @apply list-circle; + @apply list-square; } /* visited needs to come before :hover et all else it overrides them */