Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contents list add margin_bottom option #4333

Merged
merged 3 commits into from
Oct 24, 2024
Merged

Conversation

andysellick
Copy link
Contributor

What

Adds the shared helper for margin bottom to the contents list component.

Why

We want to use it somewhere and it needs a different bottom margin.

Visual Changes

None.

Trello card: https://trello.com/c/t0DlqDkW

- clean up the template file, reorder and separate the options at the top to make it more readable and remove an unused line
- adjust the wording of the documentation intro
@govuk-ci govuk-ci temporarily deployed to components-gem-pr-4333 October 24, 2024 08:42 Inactive
@govuk-ci govuk-ci temporarily deployed to components-gem-pr-4333 October 24, 2024 08:43 Inactive
@@ -36,6 +35,17 @@ examples:
text: Second thing
- href: "#third-thing"
text: Third thing
with_bottom_margin:
description: The component accepts a number for margin bottom from `0` to `9` (`0px` to `60px`) using the [GOV.UK Frontend spacing scale](https://design-system.service.gov.uk/styles/spacing/#the-responsive-spacing-scale). The default big number margin bottom is `20px` (`govuk-spacing(4)`).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Big number doesn't seem relevant here - copy paste error?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤦 thanks, fixed.

assert_select '.gem-c-contents-list.govuk-\!-margin-bottom-4'
end

it "applies margin to the component" do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe make the description more explicit - "applies requested margin to the component" as it reads more like the default option as is.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem, updated.

@govuk-ci govuk-ci temporarily deployed to components-gem-pr-4333 October 24, 2024 08:56 Inactive
@andysellick andysellick merged commit ecba33f into main Oct 24, 2024
12 checks passed
@andysellick andysellick deleted the contents-list-stuff branch October 24, 2024 08:59
@andysellick andysellick mentioned this pull request Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants