Skip to content

Commit

Permalink
Merge pull request #806 from alphagov/contextual-label-spacing
Browse files Browse the repository at this point in the history
Reduce margin-bottom on the hint when following a default or small label
  • Loading branch information
Dave House authored Jun 20, 2018
2 parents bcc5b49 + a35dcb4 commit 9e14d51
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/components/hint/_hint.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,18 @@

color: $govuk-secondary-text-colour;
}

// Reduces margin-bottom of hint when used after the default label (no class)
// or govuk-label--s for better vertical alignment.

// This adjustment will not work when the label is inside the <h1>, however
// it is unlikely that the default or govuk-label--s class would be used in
// this case.

// This adjustment will not work in browsers that do not support :not()
// Users with these browsers will see the default size margin (5px larger)

.govuk-label:not(.govuk-label--m):not(.govuk-label--l):not(.govuk-label--xl) + .govuk-hint {
margin-bottom: govuk-spacing(2);
}
}

0 comments on commit 9e14d51

Please sign in to comment.