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 spacing for nested lists #464

Merged
merged 1 commit into from
Jan 25, 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
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,15 @@ Fixes:

- Remove double margin from Date input component
(PR [#451](https://github.com/alphagov/govuk-frontend/pull/451))
- Add top margin for nested lists (PR [#464](https://github.com/alphagov/govuk-frontend/pull/464))


Internal:

- Replace Mocha/Chai with Jest, re-enable task tests, add back-link component.
Special thanks to [@htmlandbacon](https://github.com/htmlandbacon) and [@tyom](https://github.com/tyom) for sharing their approaches.
(PR [#455](https://github.com/alphagov/govuk-frontend/pull/455))


- Add example of nested lists to typography and prose scope in review app (PR [#464](https://github.com/alphagov/govuk-frontend/pull/464))

## 0.0.22-alpha (Breaking release)

Expand Down
11 changes: 11 additions & 0 deletions app/views/examples/prose-scope/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,17 @@
<li><a href="#">more fruit</a></li>
</ul>

<p>Nested lists (ul with ol):</p>
<ul>
<li>apples
<ol>
<li>Granny Smith</li>
<li>Gala</li>
</ol>
</li>
<li>oranges</li>
</ul>

<h3>Another H3 heading after a list</h3>

<h4>An H4 heading</h4>
Expand Down
38 changes: 38 additions & 0 deletions app/views/examples/typography/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,44 @@
<li>Payment</li>
<li>Confirmation</li>
</ol>
<h3 class="govuk-heading-m">Nested govuk-list 1</h3>
<ul class="govuk-list govuk-list--number">
<li><a class="govuk-link" href="#">Download kit</a></li>
<li>
<a class="govuk-link" href="#">Simple install guide</a>
<ol class="govuk-list govuk-list--number">
<li>
<a class="govuk-link" href="#">Kit requirements</a>
<ul class="govuk-list govuk-list--bullet">
<li>Node.js</li>
<li>Web browser</li>
</ul>
</li>
<li>
<a class="govuk-link" href="#">Install the kit</a>
</li>
<li>
<a class="govuk-link" href="#">Run the kit</a>
</li>
</ol>
</li>
<li><a class="govuk-link" href="#">Advanced install guide</a></li>
</ul>
<h3 class="govuk-heading-m">Nested govuk-list 1</h3>
<ul class="govuk-list govuk-list--bullet">
<li>Fruits
<ul class="govuk-list govuk-list--bullet">
<li>Apples
<ul class="govuk-list govuk-list--bullet">
<li>Granny Smith</li>
<li>Gala</li>
</ul>
</li>
<li>Oranges</li>
</ul>
</li>
<li>Vegetables</li>
</ul>
</section>

<!-- Body text -->
Expand Down
4 changes: 4 additions & 0 deletions src/globals/scss/core/_lists.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
@include govuk-responsive-margin($govuk-spacing-responsive-4, "bottom");
padding-left: 0;
list-style-type: none;

.govuk-list { // Margin for nested lists
margin-top: $govuk-spacing-scale-2;
}
}

.govuk-list > li {
Expand Down