diff --git a/app/pages/examples.njk b/app/pages/examples.njk index c8093d5c1..6473c4dd4 100644 --- a/app/pages/examples.njk +++ b/app/pages/examples.njk @@ -127,6 +127,11 @@
  • Warning callout
  • Warning callout with custom heading
  • + +

    Styles

    + {% endblock %} {% block footer %} @@ -156,4 +161,4 @@ ] })}} -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/app/styles/lists.njk b/app/styles/lists.njk new file mode 100644 index 000000000..cbe0590fa --- /dev/null +++ b/app/styles/lists.njk @@ -0,0 +1,101 @@ +{% set title = 'Lists' %} + +{% extends 'page.njk' %} + +{% block header %} + {{ super() }} +{% endblock %} + +{% block breadcrumb %} + {{ breadcrumb({ + items: [ + { + href: "../../", + text: "NHS.UK frontend" + }, + { + href: "../pages/examples.html", + text: "Examples" + } + ] + }) }} +{% endblock %} + +{% block content %} + +

    Lists

    + +

    Plain list

    + + + +

    Bulleted list

    + + + +

    Numbered list

    + +
      +
    1. Dissolve half a teaspoon of salt in a glass of warm water.
    2. +
    3. Gargle with the solution then spit it out – don't swallow it.
    4. +
    5. Repeat as often as you like.
    6. +
    + +

    Bulleted list with nested bulleted list

    + + + +

    Numbered list with nested numbered list

    + + + +

    Bulleted list with 2 nested lists

    + + + + +{% endblock %} diff --git a/packages/core/styles/_lists.scss b/packages/core/styles/_lists.scss index eb52b3e07..07556cccc 100644 --- a/packages/core/styles/_lists.scss +++ b/packages/core/styles/_lists.scss @@ -23,6 +23,12 @@ list-style-type: none; margin-top: 0; padding-left: 0; + + // Add a top margin and remove bottom margin for nested lists + %nhsuk-list { + @include nhsuk-responsive-margin(2, "top"); + margin-bottom: 0; + } } %nhsuk-list > li {