From 34e47f2d3bf0ce97517bcec77371cb0870ef42fa Mon Sep 17 00:00:00 2001 From: Andy Sellick Date: Wed, 5 Mar 2025 14:44:12 +0000 Subject: [PATCH] Fix govspeak legislative lists styles --- CHANGELOG.md | 1 + .../components/govspeak/_legislative-list.scss | 5 +++++ .../components/docs/govspeak.yml | 11 +++++++---- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f28b584a3..260948e0ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ## Unreleased +* Fix govspeak legislative lists styles ([PR #4679](https://github.com/alphagov/govuk_publishing_components/pull/4679)) * Adjust attachment component spacing ([PR #4669](https://github.com/alphagov/govuk_publishing_components/pull/4669)) * Add custom css exclude list to Asset Helper ([PR #4656](https://github.com/alphagov/govuk_publishing_components/pull/4656)) * Rubocop is now configured for rails and rspec defaults ([PR #4660](https://github.com/alphagov/govuk_publishing_components/pull/4660)) diff --git a/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_legislative-list.scss b/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_legislative-list.scss index ab71224b0d..9e5d296cc8 100644 --- a/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_legislative-list.scss +++ b/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_legislative-list.scss @@ -10,5 +10,10 @@ .legislative-list { list-style: none; margin: 0 0 govuk-spacing(4) 0; + + ol { + margin: govuk-spacing(2) 0 govuk-spacing(2) govuk-spacing(6); + list-style: none; + } } } diff --git a/app/views/govuk_publishing_components/components/docs/govspeak.yml b/app/views/govuk_publishing_components/components/docs/govspeak.yml index ff0d07cfc1..1befba3da7 100644 --- a/app/views/govuk_publishing_components/components/docs/govspeak.yml +++ b/app/views/govuk_publishing_components/components/docs/govspeak.yml @@ -775,13 +775,16 @@ examples:
  • three
  • legislative_lists: + description: Example taken from [GOV.UK Immigration rules](https://www.gov.uk/guidance/immigration-rules/immigration-rules-introduction) data: block: | -

    ordered list:

      -
    1. one
    2. -
    3. two
    4. -
    5. three
    6. +
    7. 6.2. In these rules: +
        +
      1. (a) references to primary and secondary legislation refers to that legislation as amended from time to time; and
      2. +
      3. (b) unless the contrary intention appears, the following definitions apply:
      4. +
      +
    nested_lists: data: