govuk_tech_docs 2.2.2 → 2.4.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of govuk_tech_docs might be problematic. Click here for more details.

Files changed (143) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.nvmrc +1 -1
  4. data/.travis.yml +2 -0
  5. data/CHANGELOG.md +24 -0
  6. data/example/config/tech-docs.yml +1 -0
  7. data/example/source/single-page-nav.html.md +13 -0
  8. data/govuk_tech_docs.gemspec +2 -1
  9. data/lib/assets/javascripts/_modules/collapsible-navigation.js +7 -7
  10. data/lib/assets/javascripts/_modules/in-page-navigation.js +2 -4
  11. data/lib/assets/stylesheets/_govuk_tech_docs.scss +9 -10
  12. data/lib/assets/stylesheets/modules/_search.scss +4 -25
  13. data/lib/assets/stylesheets/modules/_technical-documentation.scss +1 -1
  14. data/lib/assets/stylesheets/modules/_toc.scss +11 -11
  15. data/lib/govuk_tech_docs/table_of_contents/heading.rb +5 -1
  16. data/lib/govuk_tech_docs/table_of_contents/heading_tree_renderer.rb +2 -2
  17. data/lib/govuk_tech_docs/table_of_contents/helpers.rb +22 -11
  18. data/lib/govuk_tech_docs/tech_docs_html_renderer.rb +1 -1
  19. data/lib/govuk_tech_docs/version.rb +1 -1
  20. data/lib/source/layouts/_header.erb +1 -2
  21. data/lib/source/layouts/layout.erb +3 -1
  22. data/node_modules/govuk-frontend/govuk/_base.scss +3 -0
  23. data/node_modules/govuk-frontend/govuk/all.js +306 -94
  24. data/node_modules/govuk-frontend/govuk/all.scss +1 -3
  25. data/node_modules/govuk-frontend/govuk/components/_all.scss +33 -29
  26. data/node_modules/govuk-frontend/govuk/components/accordion/_accordion.scss +2 -208
  27. data/node_modules/govuk-frontend/govuk/components/accordion/_index.scss +197 -0
  28. data/node_modules/govuk-frontend/govuk/components/accordion/accordion.js +1 -1
  29. data/node_modules/govuk-frontend/govuk/components/back-link/_back-link.scss +2 -65
  30. data/node_modules/govuk-frontend/govuk/components/back-link/_index.scss +99 -0
  31. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/_breadcrumbs.scss +2 -118
  32. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/_index.scss +138 -0
  33. data/node_modules/govuk-frontend/govuk/components/button/_button.scss +2 -284
  34. data/node_modules/govuk-frontend/govuk/components/button/_index.scss +288 -0
  35. data/node_modules/govuk-frontend/govuk/components/character-count/_character-count.scss +2 -31
  36. data/node_modules/govuk-frontend/govuk/components/character-count/_index.scss +25 -0
  37. data/node_modules/govuk-frontend/govuk/components/character-count/character-count.js +17 -9
  38. data/node_modules/govuk-frontend/govuk/components/checkboxes/_checkboxes.scss +2 -308
  39. data/node_modules/govuk-frontend/govuk/components/checkboxes/_index.scss +320 -0
  40. data/node_modules/govuk-frontend/govuk/components/checkboxes/checkboxes.js +129 -24
  41. data/node_modules/govuk-frontend/govuk/components/cookie-banner/_cookie-banner.scss +2 -0
  42. data/node_modules/govuk-frontend/govuk/components/cookie-banner/_index.scss +51 -0
  43. data/node_modules/govuk-frontend/govuk/components/date-input/_date-input.scss +2 -30
  44. data/node_modules/govuk-frontend/govuk/components/date-input/_index.scss +26 -0
  45. data/node_modules/govuk-frontend/govuk/components/details/_details.scss +2 -88
  46. data/node_modules/govuk-frontend/govuk/components/details/_index.scss +87 -0
  47. data/node_modules/govuk-frontend/govuk/components/error-message/_error-message.scss +2 -15
  48. data/node_modules/govuk-frontend/govuk/components/error-message/_index.scss +11 -0
  49. data/node_modules/govuk-frontend/govuk/components/error-summary/_error-summary.scss +2 -59
  50. data/node_modules/govuk-frontend/govuk/components/error-summary/_index.scss +43 -0
  51. data/node_modules/govuk-frontend/govuk/components/fieldset/_fieldset.scss +2 -68
  52. data/node_modules/govuk-frontend/govuk/components/fieldset/_index.scss +64 -0
  53. data/node_modules/govuk-frontend/govuk/components/file-upload/_file-upload.scss +2 -81
  54. data/node_modules/govuk-frontend/govuk/components/file-upload/_index.scss +49 -0
  55. data/node_modules/govuk-frontend/govuk/components/footer/_footer.scss +2 -244
  56. data/node_modules/govuk-frontend/govuk/components/footer/_index.scss +241 -0
  57. data/node_modules/govuk-frontend/govuk/components/header/_header.scss +2 -318
  58. data/node_modules/govuk-frontend/govuk/components/header/_index.scss +331 -0
  59. data/node_modules/govuk-frontend/govuk/components/header/header.js +665 -316
  60. data/node_modules/govuk-frontend/govuk/components/hint/_hint.scss +2 -50
  61. data/node_modules/govuk-frontend/govuk/components/hint/_index.scss +44 -0
  62. data/node_modules/govuk-frontend/govuk/components/input/_index.scss +191 -0
  63. data/node_modules/govuk-frontend/govuk/components/input/_input.scss +2 -103
  64. data/node_modules/govuk-frontend/govuk/components/inset-text/_index.scss +24 -0
  65. data/node_modules/govuk-frontend/govuk/components/inset-text/_inset-text.scss +2 -28
  66. data/node_modules/govuk-frontend/govuk/components/label/_index.scss +41 -0
  67. data/node_modules/govuk-frontend/govuk/components/label/_label.scss +2 -45
  68. data/node_modules/govuk-frontend/govuk/components/notification-banner/_index.scss +89 -0
  69. data/node_modules/govuk-frontend/govuk/components/notification-banner/_notification-banner.scss +2 -0
  70. data/node_modules/govuk-frontend/govuk/components/notification-banner/notification-banner.js +61 -0
  71. data/node_modules/govuk-frontend/govuk/components/panel/_index.scss +44 -0
  72. data/node_modules/govuk-frontend/govuk/components/panel/_panel.scss +2 -44
  73. data/node_modules/govuk-frontend/govuk/components/phase-banner/_index.scss +27 -0
  74. data/node_modules/govuk-frontend/govuk/components/phase-banner/_phase-banner.scss +2 -31
  75. data/node_modules/govuk-frontend/govuk/components/radios/_index.scss +342 -0
  76. data/node_modules/govuk-frontend/govuk/components/radios/_radios.scss +2 -346
  77. data/node_modules/govuk-frontend/govuk/components/radios/radios.js +76 -28
  78. data/node_modules/govuk-frontend/govuk/components/select/_index.scss +49 -0
  79. data/node_modules/govuk-frontend/govuk/components/select/_select.scss +2 -57
  80. data/node_modules/govuk-frontend/govuk/components/skip-link/_index.scss +36 -0
  81. data/node_modules/govuk-frontend/govuk/components/skip-link/_skip-link.scss +2 -37
  82. data/node_modules/govuk-frontend/govuk/components/summary-list/_index.scss +145 -0
  83. data/node_modules/govuk-frontend/govuk/components/summary-list/_summary-list.scss +2 -157
  84. data/node_modules/govuk-frontend/govuk/components/table/_index.scss +71 -0
  85. data/node_modules/govuk-frontend/govuk/components/table/_table.scss +2 -54
  86. data/node_modules/govuk-frontend/govuk/components/tabs/_index.scss +130 -0
  87. data/node_modules/govuk-frontend/govuk/components/tabs/_tabs.scss +2 -142
  88. data/node_modules/govuk-frontend/govuk/components/tag/_index.scss +86 -0
  89. data/node_modules/govuk-frontend/govuk/components/tag/_tag.scss +2 -91
  90. data/node_modules/govuk-frontend/govuk/components/textarea/_index.scss +47 -0
  91. data/node_modules/govuk-frontend/govuk/components/textarea/_textarea.scss +2 -55
  92. data/node_modules/govuk-frontend/govuk/components/warning-text/_index.scss +66 -0
  93. data/node_modules/govuk-frontend/govuk/components/warning-text/_warning-text.scss +2 -60
  94. data/node_modules/govuk-frontend/govuk/core/_global-styles.scss +5 -3
  95. data/node_modules/govuk-frontend/govuk/core/_links.scss +13 -3
  96. data/node_modules/govuk-frontend/govuk/core/_lists.scss +17 -3
  97. data/node_modules/govuk-frontend/govuk/core/_section-break.scss +5 -3
  98. data/node_modules/govuk-frontend/govuk/core/_template.scss +5 -4
  99. data/node_modules/govuk-frontend/govuk/core/_typography.scss +5 -3
  100. data/node_modules/govuk-frontend/govuk/helpers/_clearfix.scss +1 -1
  101. data/node_modules/govuk-frontend/govuk/helpers/_colour.scss +1 -1
  102. data/node_modules/govuk-frontend/govuk/helpers/_device-pixels.scss +3 -3
  103. data/node_modules/govuk-frontend/govuk/helpers/_focused.scss +1 -1
  104. data/node_modules/govuk-frontend/govuk/helpers/_font-faces.scss +9 -11
  105. data/node_modules/govuk-frontend/govuk/helpers/_grid.scss +2 -1
  106. data/node_modules/govuk-frontend/govuk/helpers/_links.scss +246 -33
  107. data/node_modules/govuk-frontend/govuk/helpers/_media-queries.scss +2 -6
  108. data/node_modules/govuk-frontend/govuk/helpers/_shape-arrow.scss +1 -1
  109. data/node_modules/govuk-frontend/govuk/helpers/_spacing.scss +3 -2
  110. data/node_modules/govuk-frontend/govuk/helpers/_typography.scss +8 -7
  111. data/node_modules/govuk-frontend/govuk/helpers/_visually-hidden.scss +1 -1
  112. data/node_modules/govuk-frontend/govuk/objects/_all.scss +1 -0
  113. data/node_modules/govuk-frontend/govuk/objects/_button-group.scss +101 -0
  114. data/node_modules/govuk-frontend/govuk/objects/_form-group.scss +1 -4
  115. data/node_modules/govuk-frontend/govuk/objects/_grid.scss +3 -6
  116. data/node_modules/govuk-frontend/govuk/objects/_main-wrapper.scss +5 -4
  117. data/node_modules/govuk-frontend/govuk/objects/_width-container.scss +6 -4
  118. data/node_modules/govuk-frontend/govuk/overrides/_display.scss +6 -4
  119. data/node_modules/govuk-frontend/govuk/overrides/_spacing.scss +5 -3
  120. data/node_modules/govuk-frontend/govuk/overrides/_typography.scss +5 -3
  121. data/node_modules/govuk-frontend/govuk/overrides/_width.scss +6 -3
  122. data/node_modules/govuk-frontend/govuk/settings/_all.scss +2 -0
  123. data/node_modules/govuk-frontend/govuk/settings/_colours-applied.scss +11 -5
  124. data/node_modules/govuk-frontend/govuk/settings/_colours-organisations.scss +3 -0
  125. data/node_modules/govuk-frontend/govuk/settings/_colours-palette.scss +42 -35
  126. data/node_modules/govuk-frontend/govuk/settings/_compatibility.scss +0 -1
  127. data/node_modules/govuk-frontend/govuk/settings/_ie8.scss +1 -1
  128. data/node_modules/govuk-frontend/govuk/settings/_links.scss +62 -0
  129. data/node_modules/govuk-frontend/govuk/settings/_measurements.scss +4 -5
  130. data/node_modules/govuk-frontend/govuk/settings/_typography-font-families.scss +2 -2
  131. data/node_modules/govuk-frontend/govuk/settings/_typography-font.scss +14 -5
  132. data/node_modules/govuk-frontend/govuk/settings/_typography-responsive.scss +6 -2
  133. data/node_modules/govuk-frontend/govuk/tools/_compatibility.scss +1 -1
  134. data/node_modules/govuk-frontend/govuk/tools/_font-url.scss +1 -4
  135. data/node_modules/govuk-frontend/govuk/tools/_ie8.scss +1 -1
  136. data/node_modules/govuk-frontend/govuk/tools/_image-url.scss +1 -4
  137. data/node_modules/govuk-frontend/govuk/tools/_px-to-em.scss +1 -1
  138. data/node_modules/govuk-frontend/govuk/tools/_px-to-rem.scss +1 -1
  139. data/node_modules/govuk-frontend/govuk/utilities/_visually-hidden.scss +0 -1
  140. data/node_modules/govuk-frontend/govuk/vendor/_sass-mq.scss +0 -4
  141. data/package-lock.json +358 -288
  142. data/package.json +2 -2
  143. metadata +56 -4
@@ -0,0 +1,64 @@
1
+ @include govuk-exports("govuk/component/fieldset") {
2
+ .govuk-fieldset {
3
+ min-width: 0;
4
+ margin: 0;
5
+ padding: 0;
6
+ border: 0;
7
+ @include govuk-clearfix;
8
+ }
9
+
10
+ // Fix for Firefox < 53
11
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=504622
12
+ @supports not (caret-color: auto) {
13
+ .govuk-fieldset,
14
+ x:-moz-any-link { // stylelint-disable-line selector-type-no-unknown
15
+ display: table-cell;
16
+ }
17
+ }
18
+
19
+ .govuk-fieldset__legend {
20
+ @include govuk-font($size: 19);
21
+ @include govuk-text-colour;
22
+
23
+ // Fix legend text wrapping in Edge and IE
24
+ // 1. IE9-11 & Edge 12-13
25
+ // 2. IE8-11
26
+ box-sizing: border-box; // 1
27
+ display: table; // 2
28
+ max-width: 100%; // 1
29
+ margin-bottom: govuk-spacing(2);
30
+ padding: 0;
31
+
32
+ white-space: normal; // 1
33
+ }
34
+
35
+ // Modifiers that make legends look more like their equivalent headings
36
+
37
+ .govuk-fieldset__legend--xl {
38
+ @include govuk-font($size: 48, $weight: bold);
39
+ margin-bottom: govuk-spacing(3);
40
+ }
41
+
42
+ .govuk-fieldset__legend--l {
43
+ @include govuk-font($size: 36, $weight: bold);
44
+ margin-bottom: govuk-spacing(3);
45
+ }
46
+
47
+ .govuk-fieldset__legend--m {
48
+ @include govuk-font($size: 24, $weight: bold);
49
+ margin-bottom: govuk-spacing(3);
50
+ }
51
+
52
+ .govuk-fieldset__legend--s {
53
+ @include govuk-font($size: 19, $weight: bold);
54
+ }
55
+
56
+ // When the legend contains an H1, we want the H1 to inherit all styles from
57
+ // the legend. Effectively we want to be able to treat the heading as if it is
58
+ // not there.
59
+ .govuk-fieldset__heading {
60
+ margin: 0;
61
+ font-size: inherit;
62
+ font-weight: inherit;
63
+ }
64
+ }
@@ -1,81 +1,2 @@
1
- @import "../../settings/all";
2
- @import "../../tools/all";
3
- @import "../../helpers/all";
4
-
5
- @import "../error-message/error-message";
6
- @import "../hint/hint";
7
- @import "../label/label";
8
-
9
- @include govuk-exports("govuk/component/file-upload") {
10
- $component-padding: govuk-spacing(1);
11
-
12
- .govuk-file-upload {
13
- @include govuk-font($size: 19);
14
- @include govuk-text-colour;
15
- padding-top: $component-padding;
16
- padding-bottom: $component-padding;
17
-
18
- &:focus {
19
- // "Yank" the padding with negative margin to avoid a jump
20
- // when element is focused
21
- margin-right: -$component-padding;
22
- margin-left: -$component-padding;
23
- padding-right: $component-padding;
24
- padding-left: $component-padding;
25
-
26
- outline: $govuk-focus-width solid $govuk-focus-colour;
27
- // Use `box-shadow` to add border instead of changing `border-width`
28
- // (which changes element size) and since `outline` is already used for the
29
- // yellow focus state.
30
- box-shadow: inset 0 0 0 4px $govuk-input-border-colour;
31
-
32
- @include govuk-if-ie8 {
33
- // IE8 doesn't support `box-shadow` so add an actual border
34
- border: 4px solid $govuk-input-border-colour;
35
- }
36
- }
37
-
38
- // Set "focus-within" to fix https://bugzilla.mozilla.org/show_bug.cgi?id=1430196
39
- // so that component receives focus in Firefox.
40
- // This can't be set together with `:focus` as all versions of IE fail
41
- // to recognise `focus-within` and don't set any styles from the block
42
- // when it's a selector.
43
- &:focus-within {
44
- margin-right: -$component-padding;
45
- margin-left: -$component-padding;
46
- padding-right: $component-padding;
47
- padding-left: $component-padding;
48
-
49
- outline: $govuk-focus-width solid $govuk-focus-colour;
50
-
51
- box-shadow: inset 0 0 0 4px $govuk-input-border-colour;
52
- }
53
- }
54
-
55
- .govuk-file-upload--error {
56
- // As `upload--error` has border, it needs to have the same padding as
57
- // the standard focused element.
58
- margin-right: -$component-padding;
59
- margin-left: -$component-padding;
60
- padding-right: $component-padding;
61
- padding-left: $component-padding;
62
- border: $govuk-border-width-form-element-error solid $govuk-error-colour;
63
-
64
- &:focus {
65
- border-color: $govuk-input-border-colour;
66
- // Remove `box-shadow` inherited from `:focus` as `file-upload--error`
67
- // already has the thicker border.
68
- box-shadow: none;
69
- }
70
-
71
- // Repeat `:focus` styles to prevent error styles from being applied when
72
- // input button is pressed as this moves the focus to "within".
73
- // This can't be set together with `:focus` as all versions of IE fail
74
- // to recognise `focus-within` and don't set any styles from the block
75
- // when it's a selector.
76
- &:focus-within {
77
- border-color: $govuk-input-border-colour;
78
- box-shadow: none;
79
- }
80
- }
81
- }
1
+ @import "../../base";
2
+ @import "./index";
@@ -0,0 +1,49 @@
1
+ @import "../error-message/index";
2
+ @import "../hint/index";
3
+ @import "../label/index";
4
+
5
+ @include govuk-exports("govuk/component/file-upload") {
6
+ $component-padding: govuk-spacing(1);
7
+
8
+ .govuk-file-upload {
9
+ @include govuk-font($size: 19);
10
+ @include govuk-text-colour;
11
+ margin-left: -$component-padding;
12
+ padding: $component-padding;
13
+
14
+ // The default file upload button in Safari does not
15
+ // support setting a custom font-size. Set `-webkit-appearance`
16
+ // to `button` to drop out of the native appearance so the
17
+ // font-size is set to 19px
18
+ // https://bugs.webkit.org/show_bug.cgi?id=224746
19
+ &::-webkit-file-upload-button {
20
+ -webkit-appearance: button;
21
+ color: inherit;
22
+ font: inherit;
23
+ }
24
+
25
+ &:focus {
26
+ outline: $govuk-focus-width solid $govuk-focus-colour;
27
+ // Use `box-shadow` to add border instead of changing `border-width`
28
+ // (which changes element size) and since `outline` is already used for the
29
+ // yellow focus state.
30
+ box-shadow: inset 0 0 0 4px $govuk-input-border-colour;
31
+
32
+ @include govuk-if-ie8 {
33
+ // IE8 doesn't support `box-shadow` so add an actual border
34
+ border: 4px solid $govuk-input-border-colour;
35
+ }
36
+ }
37
+
38
+ // Set "focus-within" to fix https://bugzilla.mozilla.org/show_bug.cgi?id=1430196
39
+ // so that component receives focus in Firefox.
40
+ // This can't be set together with `:focus` as all versions of IE fail
41
+ // to recognise `focus-within` and don't set any styles from the block
42
+ // when it's a selector.
43
+ &:focus-within {
44
+ outline: $govuk-focus-width solid $govuk-focus-colour;
45
+
46
+ box-shadow: inset 0 0 0 4px $govuk-input-border-colour;
47
+ }
48
+ }
49
+ }
@@ -1,244 +1,2 @@
1
- @import "../../settings/all";
2
- @import "../../tools/all";
3
- @import "../../helpers/all";
4
-
5
- @import "../../helpers/typography";
6
-
7
- @include govuk-exports("govuk/component/footer") {
8
-
9
- $govuk-footer-background: $govuk-canvas-background-colour;
10
- $govuk-footer-border: $govuk-border-colour;
11
- // This variable can be removed entirely once the legacy palette goes away,
12
- // as it'll just be the same as $govuk-footer-border.
13
- $govuk-footer-border-top: $govuk-border-colour;
14
- $govuk-footer-text: $govuk-text-colour;
15
- $govuk-footer-link: $govuk-footer-text;
16
- $govuk-footer-link-hover: false;
17
-
18
- @if ($govuk-use-legacy-palette) {
19
- // sass-lint:disable no-color-literals
20
- $govuk-footer-border-top: #a1acb2;
21
- $govuk-footer-border: govuk-colour("grey-2");
22
- $govuk-footer-text: #454a4c;
23
- $govuk-footer-link: $govuk-footer-text;
24
-
25
- // Only used with the legacy palette
26
- $govuk-footer-link-hover: #171819;
27
- }
28
-
29
- // Based on the govuk-crest-2x.png image dimensions.
30
- $govuk-footer-crest-image-width-2x: 250px;
31
- $govuk-footer-crest-image-height-2x: 204px;
32
- // Half the 2x image so that it fits the regular 1x size.
33
- $govuk-footer-crest-image-width: ($govuk-footer-crest-image-width-2x / 2);
34
- $govuk-footer-crest-image-height: ($govuk-footer-crest-image-height-2x / 2);
35
-
36
- .govuk-footer {
37
- @include govuk-font($size: 16);
38
- @include govuk-responsive-padding(7, "top");
39
- @include govuk-responsive-padding(5, "bottom");
40
-
41
- border-top: 1px solid $govuk-footer-border-top;
42
- color: $govuk-footer-text;
43
- background: $govuk-footer-background;
44
- }
45
-
46
- .govuk-footer__link {
47
- @if ($govuk-use-legacy-palette) {
48
- &:link,
49
- &:visited {
50
- color: $govuk-footer-link;
51
- }
52
-
53
- &:hover,
54
- &:active {
55
- color: $govuk-footer-link-hover;
56
- }
57
- } @else {
58
- &:link,
59
- &:visited,
60
- &:hover,
61
- &:active {
62
- color: $govuk-footer-link;
63
- }
64
- }
65
-
66
- &:focus {
67
- @include govuk-focused-text;
68
- }
69
-
70
- // alphagov/govuk_template includes a specific a:link:focus selector
71
- // designed to make unvisited links a slightly darker blue when focussed, so
72
- // we need to override the text colour for that combination of selectors.
73
- @include govuk-compatibility(govuk_template) {
74
- &:link:focus {
75
- @include govuk-text-colour;
76
- }
77
- }
78
- }
79
-
80
- .govuk-footer__section-break {
81
- margin: 0; // Reset `<hr>` default margins
82
- @include govuk-responsive-margin(8, "bottom");
83
- border: 0; // Reset `<hr>` default borders
84
- border-bottom: 1px solid $govuk-footer-border;
85
- }
86
-
87
- .govuk-footer__meta {
88
- display: -webkit-box;
89
- display: -ms-flexbox;
90
- display: flex; // Support: Flexbox
91
- margin-right: -$govuk-gutter-half;
92
- margin-left: -$govuk-gutter-half;
93
- -ms-flex-wrap: wrap;
94
- flex-wrap: wrap; // Support: Flexbox
95
- -webkit-box-align: end;
96
- -ms-flex-align: end;
97
- align-items: flex-end; // Support: Flexbox
98
- -webkit-box-pack: center;
99
- -ms-flex-pack: center;
100
- justify-content: center; // Support: Flexbox
101
- }
102
-
103
- .govuk-footer__meta-item {
104
- margin-right: $govuk-gutter-half;
105
- margin-bottom: govuk-spacing(5);
106
- margin-left: $govuk-gutter-half;
107
- }
108
-
109
- .govuk-footer__meta-item--grow {
110
- -webkit-box-flex: 1;
111
- -ms-flex: 1;
112
- flex: 1; // Support: Flexbox
113
- @include govuk-media-query ($until: tablet) {
114
- -ms-flex-preferred-size: 320px;
115
- flex-basis: 320px; // Support: Flexbox
116
- }
117
- }
118
-
119
- .govuk-footer__licence-logo {
120
- display: inline-block;
121
- margin-right: govuk-spacing(2);
122
- @include govuk-media-query ($until: desktop) {
123
- margin-bottom: govuk-spacing(3);
124
- }
125
- vertical-align: top;
126
- }
127
-
128
- .govuk-footer__licence-description {
129
- display: inline-block;
130
- }
131
-
132
- .govuk-footer__copyright-logo {
133
- display: inline-block;
134
- min-width: $govuk-footer-crest-image-width;
135
- padding-top: ($govuk-footer-crest-image-height + govuk-spacing(2));
136
- background-image: govuk-image-url("govuk-crest.png");
137
- @include govuk-device-pixel-ratio {
138
- background-image: govuk-image-url("govuk-crest-2x.png");
139
- }
140
- background-repeat: no-repeat;
141
- background-position: 50% 0%;
142
- background-size: $govuk-footer-crest-image-width $govuk-footer-crest-image-height;
143
- text-align: center;
144
- text-decoration: none;
145
- white-space: nowrap;
146
- }
147
-
148
- .govuk-footer__inline-list {
149
- margin-top: 0;
150
- margin-bottom: govuk-spacing(3);
151
- padding: 0;
152
- }
153
-
154
- .govuk-footer__meta-custom {
155
- margin-bottom: govuk-spacing(4);
156
- }
157
-
158
- .govuk-footer__inline-list-item {
159
- display: inline-block;
160
- margin-right: govuk-spacing(3);
161
- margin-bottom: govuk-spacing(1);
162
- }
163
-
164
- .govuk-footer__heading {
165
- @include govuk-responsive-margin(7, "bottom");
166
- padding-bottom: govuk-spacing(4);
167
- @include govuk-media-query ($until: tablet) {
168
- padding-bottom: govuk-spacing(2);
169
- }
170
- border-bottom: 1px solid $govuk-footer-border;
171
- }
172
-
173
- .govuk-footer__navigation {
174
- display: -webkit-box;
175
- display: -ms-flexbox;
176
- display: flex; // Support: Flexbox
177
- margin-right: -$govuk-gutter-half;
178
- margin-left: -$govuk-gutter-half;
179
- -ms-flex-wrap: wrap;
180
- flex-wrap: wrap; // Support: Flexbox
181
- }
182
-
183
- .govuk-footer__section {
184
- display: inline-block;
185
- margin-right: $govuk-gutter-half;
186
- margin-bottom: $govuk-gutter;
187
- margin-left: $govuk-gutter-half;
188
- vertical-align: top;
189
- // Ensure columns take up equal width (typically one-half:one-half)
190
- -webkit-box-flex: 1;
191
- -ms-flex-positive: 1;
192
- flex-grow: 1; // Support: Flexbox
193
- -ms-flex-negative: 1;
194
- flex-shrink: 1; // Support: Flexbox
195
- @include govuk-media-query ($until: desktop) {
196
- // Make sure columns do not drop below 200px in width
197
- // Will typically result in wrapping, and end up in a single column on smaller screens.
198
- -ms-flex-preferred-size: 200px;
199
- flex-basis: 200px; // Support: Flexbox
200
- }
201
- }
202
-
203
- // If there are only two sections, set the layout to be two-third:one-third on desktop
204
- @include govuk-media-query ($from: desktop) {
205
- // We match the first section with `:first-child`.
206
- // To ensure the section is one of two, we can count backwards using `:nth-last-child(2)`.
207
- .govuk-footer__section:first-child:nth-last-child(2) {
208
- -webkit-box-flex: 2;
209
- -ms-flex-positive: 2;
210
- flex-grow: 2; // Support: Flexbox
211
- }
212
- }
213
-
214
- .govuk-footer__list {
215
- margin: 0;
216
- padding: 0;
217
- list-style: none;
218
- -webkit-column-gap: $govuk-gutter;
219
- -moz-column-gap: $govuk-gutter;
220
- column-gap: $govuk-gutter; // Support: Columns
221
- }
222
-
223
- @include govuk-media-query ($from: desktop) {
224
- .govuk-footer__list--columns-2 {
225
- -webkit-column-count: 2;
226
- -moz-column-count: 2;
227
- column-count: 2; // Support: Columns
228
- }
229
-
230
- .govuk-footer__list--columns-3 {
231
- -webkit-column-count: 3;
232
- -moz-column-count: 3;
233
- column-count: 3; // Support: Columns
234
- }
235
- }
236
-
237
- .govuk-footer__list-item {
238
- @include govuk-responsive-margin(4, "bottom");
239
- }
240
-
241
- .govuk-footer__list-item:last-child {
242
- margin-bottom: 0;
243
- }
244
- }
1
+ @import "../../base";
2
+ @import "./index";
@@ -0,0 +1,241 @@
1
+ @include govuk-exports("govuk/component/footer") {
2
+
3
+ $govuk-footer-background: $govuk-canvas-background-colour;
4
+ $govuk-footer-border: $govuk-border-colour;
5
+ // This variable can be removed entirely once the legacy palette goes away,
6
+ // as it'll just be the same as $govuk-footer-border.
7
+ $govuk-footer-border-top: $govuk-border-colour;
8
+ $govuk-footer-text: $govuk-text-colour;
9
+ $govuk-footer-link-hover-colour: null; // Only used with the legacy palette
10
+
11
+ @if ($govuk-use-legacy-palette) {
12
+ $govuk-footer-border-top: #a1acb2;
13
+ $govuk-footer-border: govuk-colour("grey-2");
14
+ $govuk-footer-text: #454a4c;
15
+ $govuk-footer-link-hover-colour: #171819;
16
+ }
17
+
18
+ // Based on the govuk-crest-2x.png image dimensions.
19
+ $govuk-footer-crest-image-width-2x: 250px;
20
+ $govuk-footer-crest-image-height-2x: 204px;
21
+ // Half the 2x image so that it fits the regular 1x size.
22
+ $govuk-footer-crest-image-width: ($govuk-footer-crest-image-width-2x / 2);
23
+ $govuk-footer-crest-image-height: ($govuk-footer-crest-image-height-2x / 2);
24
+
25
+ .govuk-footer {
26
+ @include govuk-font($size: 16);
27
+ @include govuk-responsive-padding(7, "top");
28
+ @include govuk-responsive-padding(5, "bottom");
29
+
30
+ border-top: 1px solid $govuk-footer-border-top;
31
+ color: $govuk-footer-text;
32
+ background: $govuk-footer-background;
33
+ }
34
+
35
+ .govuk-footer__link {
36
+ @include govuk-link-common;
37
+
38
+ @if ($govuk-use-legacy-palette) {
39
+ &:link,
40
+ &:visited {
41
+ color: $govuk-footer-text;
42
+ }
43
+
44
+ &:hover,
45
+ &:active {
46
+ color: $govuk-footer-link-hover-colour;
47
+ }
48
+ } @else {
49
+ @include govuk-link-style-text;
50
+ }
51
+
52
+ // alphagov/govuk_template includes a specific a:link:focus selector
53
+ // designed to make unvisited links a slightly darker blue when focussed, so
54
+ // we need to override the text colour for that combination of selectors.
55
+ @include govuk-compatibility(govuk_template) {
56
+ &:link:focus {
57
+ @include govuk-text-colour;
58
+ }
59
+ }
60
+ }
61
+
62
+ .govuk-footer__section-break {
63
+ margin: 0; // Reset `<hr>` default margins
64
+ @include govuk-responsive-margin(8, "bottom");
65
+ border: 0; // Reset `<hr>` default borders
66
+ border-bottom: 1px solid $govuk-footer-border;
67
+ }
68
+
69
+ .govuk-footer__meta {
70
+ display: -webkit-box;
71
+ display: -webkit-flex;
72
+ display: -ms-flexbox;
73
+ display: flex; // Support: Flexbox
74
+ margin-right: -$govuk-gutter-half;
75
+ margin-left: -$govuk-gutter-half;
76
+ -webkit-flex-wrap: wrap;
77
+ -ms-flex-wrap: wrap;
78
+ flex-wrap: wrap; // Support: Flexbox
79
+ -webkit-box-align: end;
80
+ -webkit-align-items: flex-end;
81
+ -ms-flex-align: end;
82
+ align-items: flex-end; // Support: Flexbox
83
+ -webkit-box-pack: center;
84
+ -webkit-justify-content: center;
85
+ -ms-flex-pack: center;
86
+ justify-content: center; // Support: Flexbox
87
+ }
88
+
89
+ .govuk-footer__meta-item {
90
+ margin-right: $govuk-gutter-half;
91
+ margin-bottom: govuk-spacing(5);
92
+ margin-left: $govuk-gutter-half;
93
+ }
94
+
95
+ .govuk-footer__meta-item--grow {
96
+ -webkit-box-flex: 1;
97
+ -webkit-flex: 1;
98
+ -ms-flex: 1;
99
+ flex: 1; // Support: Flexbox
100
+ @include govuk-media-query ($until: tablet) {
101
+ -webkit-flex-basis: 320px;
102
+ -ms-flex-preferred-size: 320px;
103
+ flex-basis: 320px; // Support: Flexbox
104
+ }
105
+ }
106
+
107
+ .govuk-footer__licence-logo {
108
+ display: inline-block;
109
+ margin-right: govuk-spacing(2);
110
+ @include govuk-media-query ($until: desktop) {
111
+ margin-bottom: govuk-spacing(3);
112
+ }
113
+ vertical-align: top;
114
+ }
115
+
116
+ .govuk-footer__licence-description {
117
+ display: inline-block;
118
+ }
119
+
120
+ .govuk-footer__copyright-logo {
121
+ display: inline-block;
122
+ min-width: $govuk-footer-crest-image-width;
123
+ padding-top: ($govuk-footer-crest-image-height + govuk-spacing(2));
124
+ background-image: govuk-image-url("govuk-crest.png");
125
+ @include govuk-device-pixel-ratio {
126
+ background-image: govuk-image-url("govuk-crest-2x.png");
127
+ }
128
+ background-repeat: no-repeat;
129
+ background-position: 50% 0%;
130
+ background-size: $govuk-footer-crest-image-width $govuk-footer-crest-image-height;
131
+ text-align: center;
132
+ white-space: nowrap;
133
+ }
134
+
135
+ .govuk-footer__inline-list {
136
+ margin-top: 0;
137
+ margin-bottom: govuk-spacing(3);
138
+ padding: 0;
139
+ }
140
+
141
+ .govuk-footer__meta-custom {
142
+ margin-bottom: govuk-spacing(4);
143
+ }
144
+
145
+ .govuk-footer__inline-list-item {
146
+ display: inline-block;
147
+ margin-right: govuk-spacing(3);
148
+ margin-bottom: govuk-spacing(1);
149
+ }
150
+
151
+ .govuk-footer__heading {
152
+ @include govuk-responsive-margin(7, "bottom");
153
+ padding-bottom: govuk-spacing(4);
154
+ @include govuk-media-query ($until: tablet) {
155
+ padding-bottom: govuk-spacing(2);
156
+ }
157
+ border-bottom: 1px solid $govuk-footer-border;
158
+ }
159
+
160
+ .govuk-footer__navigation {
161
+ display: -webkit-box;
162
+ display: -webkit-flex;
163
+ display: -ms-flexbox;
164
+ display: flex; // Support: Flexbox
165
+ margin-right: -$govuk-gutter-half;
166
+ margin-left: -$govuk-gutter-half;
167
+ -webkit-flex-wrap: wrap;
168
+ -ms-flex-wrap: wrap;
169
+ flex-wrap: wrap; // Support: Flexbox
170
+ }
171
+
172
+ .govuk-footer__section {
173
+ display: inline-block;
174
+ margin-right: $govuk-gutter-half;
175
+ margin-bottom: $govuk-gutter;
176
+ margin-left: $govuk-gutter-half;
177
+ vertical-align: top;
178
+ // Ensure columns take up equal width (typically one-half:one-half)
179
+ -webkit-box-flex: 1;
180
+ -webkit-flex-grow: 1;
181
+ -ms-flex-positive: 1;
182
+ flex-grow: 1; // Support: Flexbox
183
+ -webkit-flex-shrink: 1;
184
+ -ms-flex-negative: 1;
185
+ flex-shrink: 1; // Support: Flexbox
186
+ @include govuk-media-query ($until: desktop) {
187
+ // Make sure columns do not drop below 200px in width
188
+ // Will typically result in wrapping, and end up in a single column on smaller screens.
189
+ -webkit-flex-basis: 200px;
190
+ -ms-flex-preferred-size: 200px;
191
+ flex-basis: 200px; // Support: Flexbox
192
+ }
193
+ }
194
+
195
+ // If there are only two sections, set the layout to be two-third:one-third on desktop
196
+ @include govuk-media-query ($from: desktop) {
197
+ // We match the first section with `:first-child`.
198
+ // To ensure the section is one of two, we can count backwards using `:nth-last-child(2)`.
199
+ .govuk-footer__section:first-child:nth-last-child(2) {
200
+ -webkit-box-flex: 2;
201
+ -webkit-flex-grow: 2;
202
+ -ms-flex-positive: 2;
203
+ flex-grow: 2; // Support: Flexbox
204
+ }
205
+ }
206
+
207
+ .govuk-footer__list {
208
+ margin: 0;
209
+ padding: 0;
210
+ list-style: none;
211
+ -webkit-column-gap: $govuk-gutter;
212
+ column-gap: $govuk-gutter; // Support: Columns
213
+
214
+ // Disable thicker underlines on hover because of a bug in Chromium
215
+ // affecting links within columns
216
+ // https://bugs.chromium.org/p/chromium/issues/detail?id=1190987
217
+ .govuk-footer__link:hover {
218
+ text-decoration-thickness: auto;
219
+ }
220
+ }
221
+
222
+ @include govuk-media-query ($from: desktop) {
223
+ .govuk-footer__list--columns-2 {
224
+ -webkit-column-count: 2;
225
+ column-count: 2; // Support: Columns
226
+ }
227
+
228
+ .govuk-footer__list--columns-3 {
229
+ -webkit-column-count: 3;
230
+ column-count: 3; // Support: Columns
231
+ }
232
+ }
233
+
234
+ .govuk-footer__list-item {
235
+ @include govuk-responsive-margin(4, "bottom");
236
+ }
237
+
238
+ .govuk-footer__list-item:last-child {
239
+ margin-bottom: 0;
240
+ }
241
+ }