Skip to content

Commit

Permalink
Merge pull request #408 from alphagov/adjacent-list-spacing
Browse files Browse the repository at this point in the history
Add adjecent styles for headings after lists
  • Loading branch information
Dave House authored Jan 5, 2018
2 parents eeadbe9 + a023e04 commit de0b82d
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/globals/scss/core/_typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,17 @@
}

.govuk-body-m + .govuk-heading-l,
.govuk-body-s + .govuk-heading-l {
.govuk-body-s + .govuk-heading-l,
.govuk-list + .govuk-heading-l {
@include govuk-responsive-padding($govuk-spacing-responsive-4, "top");
}

.govuk-body-m + .govuk-heading-m,
.govuk-body-s + .govuk-heading-m,
.govuk-list + .govuk-heading-m,
.govuk-body-m + .govuk-heading-s,
.govuk-body-s + .govuk-heading-s {
.govuk-body-s + .govuk-heading-s,
.govuk-list + .govuk-heading-s {
padding-top: $govuk-spacing-scale-1;

@include mq($from: tablet) {
Expand Down
78 changes: 78 additions & 0 deletions src/views/examples/typography/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,84 @@

<p class="govuk-body-m">You’ll receive your badge within 4 weeks or you’ll be contacted if you need to provide more information.</p>
</section>

<section class="govuk-!-mt-r8">
<h2 class="govuk-heading-l govuk-!-pb-r2" style="border-bottom: 4px solid;">Adjacent siblings</h2>

<p class="govuk-body-l">govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body </p>

<h2 class="govuk-heading-l">govuk-heading-l govuk-heading-l govuk-heading-l govuk-heading-l govuk-heading-l</h2>

<p class="govuk-body">govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body </p>

<h2 class="govuk-heading-l">govuk-heading-l govuk-heading-l govuk-heading-l govuk-heading-l govuk-heading-l</h2>

<p class="govuk-body">govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body </p>

<h3 class="govuk-heading-m">govuk-heading-m govuk-heading-m govuk-heading-m govuk-heading-m govuk-heading-m</h3>

<p class="govuk-body">govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body govuk-body </p>

<h4 class="govuk-heading-s">govuk-heading-s govuk-heading-s govuk-heading-s govuk-heading-s govuk-heading-s</h4>

<ul class="govuk-list govuk-list--bullet">
<li>List item</li>
<li>List item</li>
<li>List item</li>
<li>List item</li>
</ul>

<h2 class="govuk-heading-l">govuk-heading-l govuk-heading-l govuk-heading-l govuk-heading-l govuk-heading-l</h2>

<ul class="govuk-list govuk-list--bullet">
<li>List item</li>
<li>List item</li>
<li>List item</li>
<li>List item</li>
</ul>

<h3 class="govuk-heading-m">govuk-heading-m govuk-heading-m govuk-heading-m govuk-heading-m govuk-heading-m</h3>

<ul class="govuk-list govuk-list--bullet">
<li>List item</li>
<li>List item</li>
<li>List item</li>
<li>List item</li>
</ul>

<h4 class="govuk-heading-s">govuk-heading-s govuk-heading-s govuk-heading-s govuk-heading-s govuk-heading-s</h4>


<ol class="govuk-list govuk-list--number">
<li>List item</li>
<li>List item</li>
<li>List item</li>
<li>List item</li>
</ol>

<h2 class="govuk-heading-l">govuk-heading-l govuk-heading-l govuk-heading-l govuk-heading-l govuk-heading-l</h2>

<ol class="govuk-list govuk-list--number">
<li>List item</li>
<li>List item</li>
<li>List item</li>
<li>List item</li>
</ol>

<h3 class="govuk-heading-m">govuk-heading-m govuk-heading-m govuk-heading-m govuk-heading-m govuk-heading-m</h3>

<ol class="govuk-list govuk-list--number">
<li>List item</li>
<li>List item</li>
<li>List item</li>
<li>List item</li>
</ol>

<h4 class="govuk-heading-s">govuk-heading-s govuk-heading-s govuk-heading-s govuk-heading-s govuk-heading-s</h4>

</section>


</div>
</div>

Expand Down

0 comments on commit de0b82d

Please sign in to comment.