Skip to content

Commit

Permalink
Merge pull request #1330 from alphagov/update-tabs-spacing
Browse files Browse the repository at this point in the history
Spacing of tabs list updated to be more inline with similar lists on GOV.UK and the Design System
  • Loading branch information
hannalaakso authored May 10, 2019
2 parents 814cb5d + 956aba6 commit f83a585
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 8 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,14 @@

([PR #1288](https://github.com/alphagov/govuk-frontend/pull/1288))

- Spacing of tabs list updated to be more inline with similar lists on GOV.UK and the Design System

The tabs headings spacing has changed slightly on on mobile and when Javascript is disabled. See https://github.com/alphagov/govuk-frontend/pull/1330#issuecomment-491233294

To migrate: In the unlikely event that your app relies on the spacing of the tab headings being a certain height on mobile and with JS disabled, you should make the necessary adjustments in your code.

([PR #1330](https://github.com/alphagov/govuk-frontend/pull/1330))

- Pull Request Title goes here

Description goes here (optional)
Expand Down
8 changes: 6 additions & 2 deletions app/assets/scss/partials/_banner.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@
font-size: inherit;
}

.govuk-link:not(:focus) {
color: inherit;
.govuk-link {
color: govuk-colour("white");
}

.govuk-link:focus {
color: $govuk-text-colour;
}
}

Expand Down
16 changes: 10 additions & 6 deletions src/components/tabs/_tabs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,14 @@

.govuk-tabs__title {
@include govuk-font($size: 19);
margin-bottom: govuk-spacing(1);
margin-bottom: govuk-spacing(2);
}

.govuk-tabs__list {
margin: 0;
padding: 0;
list-style: none;
@include mq($until: tablet) {
@include govuk-responsive-margin(6, "bottom");
}
@include govuk-responsive-margin(6, "bottom");
}

.govuk-tabs__list-item {
Expand All @@ -41,8 +39,7 @@
@include govuk-font($size: 19);

display: inline-block;
padding-top: govuk-spacing(2);
padding-bottom: govuk-spacing(2);
margin-bottom: govuk-spacing(2);

&[aria-current = "true"] {
color: govuk-colour("black");
Expand All @@ -61,6 +58,7 @@

.govuk-tabs__list {
@include govuk-clearfix;
margin-bottom: 0;
border-bottom: 1px solid $govuk-border-colour;
}

Expand All @@ -86,6 +84,12 @@
text-align: center;
text-decoration: underline;

@include mq($from: tablet) {
margin-bottom: 0;
padding-top: govuk-spacing(2);
padding-bottom: govuk-spacing(2);
}

@include govuk-if-ie8 {
// IE8 doesn't support `box-shadow` so add an actual border that is
// modified to indicate state.
Expand Down

0 comments on commit f83a585

Please sign in to comment.