@include govuk-exports("govuk/component/footer") { $govuk-footer-background: $govuk-canvas-background-colour; $govuk-footer-border: $govuk-border-colour; // This variable can be removed entirely once the legacy palette goes away, // as it'll just be the same as $govuk-footer-border. $govuk-footer-border-top: $govuk-border-colour; $govuk-footer-text: $govuk-text-colour; $govuk-footer-link-hover-colour: null; // Only used with the legacy palette @if ($govuk-use-legacy-palette) { $govuk-footer-border-top: #a1acb2; $govuk-footer-border: govuk-colour("grey-2"); $govuk-footer-text: #454a4c; $govuk-footer-link-hover-colour: #171819; } // Based on the govuk-crest-2x.png image dimensions. $govuk-footer-crest-image-width-2x: 250px; $govuk-footer-crest-image-height-2x: 204px; // Half the 2x image so that it fits the regular 1x size. $govuk-footer-crest-image-width: ($govuk-footer-crest-image-width-2x / 2); $govuk-footer-crest-image-height: ($govuk-footer-crest-image-height-2x / 2); .govuk-footer { @include govuk-font($size: 16); @include govuk-responsive-padding(7, "top"); @include govuk-responsive-padding(5, "bottom"); border-top: 1px solid $govuk-footer-border-top; color: $govuk-footer-text; background: $govuk-footer-background; } .govuk-footer__link { @include govuk-link-common; @if ($govuk-use-legacy-palette) { &:link, &:visited { color: $govuk-footer-text; } &:hover, &:active { color: $govuk-footer-link-hover-colour; } } @else { @include govuk-link-style-text; } // alphagov/govuk_template includes a specific a:link:focus selector // designed to make unvisited links a slightly darker blue when focussed, so // we need to override the text colour for that combination of selectors. @include govuk-compatibility(govuk_template) { &:link:focus { @include govuk-text-colour; } } } .govuk-footer__section-break { margin: 0; // Reset `
` default margins @include govuk-responsive-margin(8, "bottom"); border: 0; // Reset `
` default borders border-bottom: 1px solid $govuk-footer-border; } .govuk-footer__meta { display: -webkit-box; display: -ms-flexbox; display: flex; // Support: Flexbox margin-right: -$govuk-gutter-half; margin-left: -$govuk-gutter-half; -ms-flex-wrap: wrap; flex-wrap: wrap; // Support: Flexbox -webkit-box-align: end; -ms-flex-align: end; align-items: flex-end; // Support: Flexbox -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; // Support: Flexbox } .govuk-footer__meta-item { margin-right: $govuk-gutter-half; margin-bottom: govuk-spacing(5); margin-left: $govuk-gutter-half; } .govuk-footer__meta-item--grow { -webkit-box-flex: 1; -ms-flex: 1; flex: 1; // Support: Flexbox @include govuk-media-query ($until: tablet) { -ms-flex-preferred-size: 320px; flex-basis: 320px; // Support: Flexbox } } .govuk-footer__licence-logo { display: inline-block; margin-right: govuk-spacing(2); @include govuk-media-query ($until: desktop) { margin-bottom: govuk-spacing(3); } vertical-align: top; } .govuk-footer__licence-description { display: inline-block; } .govuk-footer__copyright-logo { display: inline-block; min-width: $govuk-footer-crest-image-width; padding-top: ($govuk-footer-crest-image-height + govuk-spacing(2)); background-image: govuk-image-url("govuk-crest.png"); @include govuk-device-pixel-ratio { background-image: govuk-image-url("govuk-crest-2x.png"); } background-repeat: no-repeat; background-position: 50% 0%; background-size: $govuk-footer-crest-image-width $govuk-footer-crest-image-height; text-align: center; white-space: nowrap; } .govuk-footer__inline-list { margin-top: 0; margin-bottom: govuk-spacing(3); padding: 0; } .govuk-footer__meta-custom { margin-bottom: govuk-spacing(4); } .govuk-footer__inline-list-item { display: inline-block; margin-right: govuk-spacing(3); margin-bottom: govuk-spacing(1); } .govuk-footer__heading { @include govuk-responsive-margin(7, "bottom"); padding-bottom: govuk-spacing(4); @include govuk-media-query ($until: tablet) { padding-bottom: govuk-spacing(2); } border-bottom: 1px solid $govuk-footer-border; } .govuk-footer__navigation { display: -webkit-box; display: -ms-flexbox; display: flex; // Support: Flexbox margin-right: -$govuk-gutter-half; margin-left: -$govuk-gutter-half; -ms-flex-wrap: wrap; flex-wrap: wrap; // Support: Flexbox } .govuk-footer__section { display: inline-block; margin-right: $govuk-gutter-half; margin-bottom: $govuk-gutter; margin-left: $govuk-gutter-half; vertical-align: top; // Ensure columns take up equal width (typically one-half:one-half) -webkit-box-flex: 1; -ms-flex-positive: 1; flex-grow: 1; // Support: Flexbox -ms-flex-negative: 1; flex-shrink: 1; // Support: Flexbox @include govuk-media-query ($until: desktop) { // Make sure columns do not drop below 200px in width // Will typically result in wrapping, and end up in a single column on smaller screens. -ms-flex-preferred-size: 200px; flex-basis: 200px; // Support: Flexbox } } // If there are only two sections, set the layout to be two-third:one-third on desktop @include govuk-media-query ($from: desktop) { // We match the first section with `:first-child`. // To ensure the section is one of two, we can count backwards using `:nth-last-child(2)`. .govuk-footer__section:first-child:nth-last-child(2) { -webkit-box-flex: 2; -ms-flex-positive: 2; flex-grow: 2; // Support: Flexbox } } .govuk-footer__list { margin: 0; padding: 0; list-style: none; -webkit-column-gap: $govuk-gutter; column-gap: $govuk-gutter; // Support: Columns // Disable thicker underlines on hover because of a bug in Chromium // affecting links within columns // https://bugs.chromium.org/p/chromium/issues/detail?id=1190987 .govuk-footer__link:hover { text-decoration-thickness: auto; } } @include govuk-media-query ($from: desktop) { .govuk-footer__list--columns-2 { -webkit-column-count: 2; column-count: 2; // Support: Columns } .govuk-footer__list--columns-3 { -webkit-column-count: 3; column-count: 3; // Support: Columns } } .govuk-footer__list-item { @include govuk-responsive-margin(4, "bottom"); } .govuk-footer__list-item:last-child { margin-bottom: 0; } }