Skip to content

Commit

Permalink
Improve robustness of description colour in masthead component
Browse files Browse the repository at this point in the history
  • Loading branch information
paulrobertlloyd committed Dec 24, 2023
1 parent 7567ad8 commit d1f812d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/masthead.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ If you’re using Nunjucks macros in production with `html` options, or ones end
[
{ text: "description" },
{ text: "object" },
{ text: "Description text shown in the masthead. See [description](#description)." | markdown }
{ text: "Short description text shown below the title. See [description](#description)." | markdown }
],
[
{ text: "startButton" },
Expand Down
1 change: 1 addition & 0 deletions x-govuk/components/masthead/_masthead.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ $x-govuk-masthead-text-colour: govuk-colour("white");
.x-govuk-masthead__description {
@include govuk-font($size: 24);
@include govuk-responsive-margin(6, "bottom");
color: $x-govuk-masthead-text-colour;

a {
@include govuk-link-style-inverse;
Expand Down
4 changes: 2 additions & 2 deletions x-govuk/components/masthead/template.njk
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
</h1>
{% endif %}
{% if params.description %}
<div class="x-govuk-masthead__description{%- if params.description.classes %} {{ params.description.classes }}{% endif %}">
<p class="x-govuk-masthead__description{%- if params.description.classes %} {{ params.description.classes }}{% endif %}">
{{ params.description.html | safe if params.description.html else params.description.text }}
</div>
</p>
{% endif %}
{% if params.startButton %}
{{ govukButton({
Expand Down

0 comments on commit d1f812d

Please sign in to comment.