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 adjecent styles for headings after lists #408

Merged
merged 2 commits into from
Jan 5, 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: 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,
Copy link
Member

Choose a reason for hiding this comment

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

Does this rule somehow relate to lists?

Copy link
Contributor

Choose a reason for hiding this comment

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

The only thing that's changed is the opening parenthesis has been changed to a comma to allow the extra selectors to be added to the list…

Copy link
Member

Choose a reason for hiding this comment

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

So it has, I must be tired 😅

.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,
Copy link
Member

Choose a reason for hiding this comment

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

Similar here, does this relate to lists styling?

.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