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

Add 5px bottom margin to bullet-less list items #1078

Merged
merged 2 commits into from
Nov 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,10 @@

🔧 Fixes:

- Pull Request Title goes here

Description goes here (optional)
- Add 5px bottom margin to list items within lists that do not have bullets or
numbers on mobile breakpoints to make each item visually distinct.

([PR #N](https://github.com/alphagov/govuk-frontend/pull/N))
([PR #1078](https://github.com/alphagov/govuk-frontend/pull/1078))

## 2.4.0 (Feature release)

Expand Down
25 changes: 17 additions & 8 deletions src/core/_lists.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
}

%govuk-list > li {
@include govuk-media-query($from: tablet) {
margin-bottom: govuk-spacing(1);
}
// Lists without numbers or bullets should always have extra space between
// list items. Lists with numbers or bullets only have this extra space on
// tablet and above
margin-bottom: govuk-spacing(1);
}

.govuk-list {
Expand All @@ -26,19 +27,27 @@

%govuk-list--bullet {
padding-left: govuk-spacing(4);

list-style-type: disc;
}

.govuk-list--bullet {
@extend %govuk-list--bullet;
}

%govuk-list--number {
padding-left: govuk-spacing(4);
list-style-type: decimal;
}

%govuk-list--bullet > li,
%govuk-list--number > li {
margin-bottom: 0;

@include govuk-media-query($from: tablet) {
margin-bottom: govuk-spacing(1);
}
}

.govuk-list--bullet {
@extend %govuk-list--bullet;
}

.govuk-list--number {
@extend %govuk-list--number;
}
Expand Down