katalyst-govuk-formbuilder 1.3.2 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (140) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +8 -0
  3. data/app/assets/builds/katalyst/govuk/formbuilder.css +58 -5
  4. data/app/assets/builds/katalyst/govuk/formbuilder.js +98 -64
  5. data/app/assets/builds/katalyst/govuk/formbuilder.min.js +1 -1
  6. data/app/assets/stylesheets/katalyst/govuk/components/richtextarea/_index.scss +7 -6
  7. data/app/assets/stylesheets/katalyst/govuk/formbuilder.scss +1 -1
  8. data/lib/katalyst/govuk/formbuilder/engine.rb +1 -0
  9. data/lib/katalyst/govuk/formbuilder/version.rb +1 -1
  10. data/vendor/assets/stylesheets/govuk-frontend/govuk/_base.scss +3 -0
  11. data/vendor/assets/stylesheets/govuk-frontend/govuk/all-ie8.scss +14 -0
  12. data/vendor/assets/stylesheets/govuk-frontend/govuk/all.scss +9 -0
  13. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/_all.scss +34 -0
  14. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/accordion/_accordion.scss +2 -0
  15. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/accordion/_index.scss +392 -0
  16. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/back-link/_back-link.scss +2 -0
  17. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/back-link/_index.scss +99 -0
  18. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/breadcrumbs/_breadcrumbs.scss +2 -0
  19. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/breadcrumbs/_index.scss +147 -0
  20. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/button/_button.scss +2 -0
  21. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/button/_index.scss +297 -0
  22. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/character-count/_character-count.scss +2 -0
  23. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/character-count/_index.scss +34 -0
  24. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/checkboxes/_checkboxes.scss +2 -0
  25. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/checkboxes/_index.scss +335 -0
  26. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/cookie-banner/_cookie-banner.scss +2 -0
  27. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/cookie-banner/_index.scss +49 -0
  28. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/date-input/_date-input.scss +2 -0
  29. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/date-input/_index.scss +26 -0
  30. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/details/_details.scss +2 -0
  31. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/details/_index.scss +88 -0
  32. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/error-message/_error-message.scss +2 -0
  33. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/error-message/_index.scss +12 -0
  34. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/error-summary/_error-summary.scss +2 -0
  35. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/error-summary/_index.scss +43 -0
  36. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/fieldset/_fieldset.scss +2 -0
  37. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/fieldset/_index.scss +64 -0
  38. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/file-upload/_file-upload.scss +2 -0
  39. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/file-upload/_index.scss +55 -0
  40. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/footer/_footer.scss +2 -0
  41. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/footer/_index.scss +193 -0
  42. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/header/_header.scss +2 -0
  43. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/header/_index.scss +349 -0
  44. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/hint/_hint.scss +2 -0
  45. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/hint/_index.scss +42 -0
  46. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/input/_index.scss +193 -0
  47. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/input/_input.scss +2 -0
  48. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/inset-text/_index.scss +24 -0
  49. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/inset-text/_inset-text.scss +2 -0
  50. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/label/_index.scss +41 -0
  51. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/label/_label.scss +2 -0
  52. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/notification-banner/_index.scss +89 -0
  53. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/notification-banner/_notification-banner.scss +2 -0
  54. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/pagination/_index.scss +247 -0
  55. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/pagination/_pagination.scss +2 -0
  56. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/panel/_index.scss +56 -0
  57. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/panel/_panel.scss +2 -0
  58. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/phase-banner/_index.scss +27 -0
  59. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/phase-banner/_phase-banner.scss +2 -0
  60. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/radios/_index.scss +349 -0
  61. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/radios/_radios.scss +2 -0
  62. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/select/_index.scss +66 -0
  63. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/select/_select.scss +2 -0
  64. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/skip-link/_index.scss +47 -0
  65. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/skip-link/_skip-link.scss +2 -0
  66. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/summary-list/_index.scss +276 -0
  67. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/summary-list/_summary-list.scss +2 -0
  68. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/table/_index.scss +71 -0
  69. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/table/_table.scss +2 -0
  70. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/tabs/_index.scss +130 -0
  71. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/tabs/_tabs.scss +2 -0
  72. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/tag/_index.scss +81 -0
  73. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/tag/_tag.scss +2 -0
  74. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/textarea/_index.scss +54 -0
  75. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/textarea/_textarea.scss +2 -0
  76. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/warning-text/_index.scss +66 -0
  77. data/vendor/assets/stylesheets/govuk-frontend/govuk/components/warning-text/_warning-text.scss +2 -0
  78. data/vendor/assets/stylesheets/govuk-frontend/govuk/core/_all.scss +6 -0
  79. data/vendor/assets/stylesheets/govuk-frontend/govuk/core/_global-styles.scss +19 -0
  80. data/vendor/assets/stylesheets/govuk-frontend/govuk/core/_govuk-frontend-version.scss +5 -0
  81. data/vendor/assets/stylesheets/govuk-frontend/govuk/core/_links.scss +35 -0
  82. data/vendor/assets/stylesheets/govuk-frontend/govuk/core/_lists.scss +66 -0
  83. data/vendor/assets/stylesheets/govuk-frontend/govuk/core/_section-break.scss +56 -0
  84. data/vendor/assets/stylesheets/govuk-frontend/govuk/core/_typography.scss +186 -0
  85. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_all.scss +12 -0
  86. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_clearfix.scss +15 -0
  87. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_colour.scss +98 -0
  88. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_device-pixels.scss +37 -0
  89. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_focused.scss +33 -0
  90. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_font-faces.scss +41 -0
  91. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_grid.scss +61 -0
  92. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_links.scss +429 -0
  93. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_media-queries.scss +91 -0
  94. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_shape-arrow.scss +80 -0
  95. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_spacing.scss +171 -0
  96. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_typography.scss +214 -0
  97. data/vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_visually-hidden.scss +84 -0
  98. data/vendor/assets/stylesheets/govuk-frontend/govuk/objects/_all.scss +6 -0
  99. data/vendor/assets/stylesheets/govuk-frontend/govuk/objects/_button-group.scss +85 -0
  100. data/vendor/assets/stylesheets/govuk-frontend/govuk/objects/_form-group.scss +23 -0
  101. data/vendor/assets/stylesheets/govuk-frontend/govuk/objects/_grid.scss +24 -0
  102. data/vendor/assets/stylesheets/govuk-frontend/govuk/objects/_main-wrapper.scss +53 -0
  103. data/vendor/assets/stylesheets/govuk-frontend/govuk/objects/_template.scss +32 -0
  104. data/vendor/assets/stylesheets/govuk-frontend/govuk/objects/_width-container.scss +84 -0
  105. data/vendor/assets/stylesheets/govuk-frontend/govuk/overrides/_all.scss +5 -0
  106. data/vendor/assets/stylesheets/govuk-frontend/govuk/overrides/_display.scss +24 -0
  107. data/vendor/assets/stylesheets/govuk-frontend/govuk/overrides/_spacing.scss +102 -0
  108. data/vendor/assets/stylesheets/govuk-frontend/govuk/overrides/_text-align.scss +14 -0
  109. data/vendor/assets/stylesheets/govuk-frontend/govuk/overrides/_typography.scss +21 -0
  110. data/vendor/assets/stylesheets/govuk-frontend/govuk/overrides/_width.scss +46 -0
  111. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_all.scss +24 -0
  112. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_assets.scss +82 -0
  113. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_colours-applied.scss +155 -0
  114. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_colours-organisations.scss +146 -0
  115. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_colours-palette.scss +120 -0
  116. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_compatibility.scss +100 -0
  117. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_global-styles.scss +13 -0
  118. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_ie8.scss +34 -0
  119. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_links.scss +66 -0
  120. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_measurements.scss +95 -0
  121. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_media-queries.scss +23 -0
  122. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_spacing.scss +76 -0
  123. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_typography-font-families.scss +32 -0
  124. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_typography-font.scss +112 -0
  125. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_typography-responsive.scss +195 -0
  126. data/vendor/assets/stylesheets/govuk-frontend/govuk/settings/_warnings.scss +53 -0
  127. data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_all.scss +7 -0
  128. data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_compatibility.scss +50 -0
  129. data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_exports.scss +33 -0
  130. data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_font-url.scss +25 -0
  131. data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_ie8.scss +87 -0
  132. data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_image-url.scss +25 -0
  133. data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_px-to-em.scss +20 -0
  134. data/vendor/assets/stylesheets/govuk-frontend/govuk/tools/_px-to-rem.scss +20 -0
  135. data/vendor/assets/stylesheets/govuk-frontend/govuk/utilities/_all.scss +2 -0
  136. data/vendor/assets/stylesheets/govuk-frontend/govuk/utilities/_clearfix.scss +5 -0
  137. data/vendor/assets/stylesheets/govuk-frontend/govuk/utilities/_visually-hidden.scss +9 -0
  138. data/vendor/assets/stylesheets/govuk-frontend/govuk/vendor/_sass-mq.scss +347 -0
  139. metadata +132 -4
  140. data/app/assets/builds/katalyst/govuk/formbuilder.min.css +0 -1
@@ -0,0 +1,49 @@
1
+ @include govuk-exports("govuk/component/cookie-banner") {
2
+
3
+ // This needs to be kept in sync with the header component's styles
4
+ $border-bottom-width: govuk-spacing(2);
5
+
6
+ .govuk-cookie-banner {
7
+ padding-top: govuk-spacing(4);
8
+ // The component does not set bottom spacing.
9
+ // The bottom spacing should be created by the items inside the component.
10
+
11
+ // Visually separate the cookie banner from content underneath
12
+ // when user changes colours in their browser.
13
+ border-bottom: $border-bottom-width solid transparent;
14
+
15
+ background-color: govuk-colour("light-grey", $legacy: "grey-3");
16
+ }
17
+
18
+ // Support older browsers which don't hide elements with the `hidden` attribute
19
+ // when user hides the whole cookie banner with a 'Hide' button.
20
+ .govuk-cookie-banner[hidden] {
21
+ display: none;
22
+ }
23
+
24
+ .govuk-cookie-banner__message {
25
+ // Remove the extra height added by the separator border.
26
+ margin-bottom: -$border-bottom-width;
27
+
28
+ &[hidden] {
29
+ // Support older browsers which don't hide elements with the `hidden` attribute
30
+ // when the visibility of cookie and replacement messages is toggled.
31
+ display: none;
32
+ }
33
+
34
+ &:focus {
35
+ // Remove the native visible focus indicator when the element is programmatically focused.
36
+ //
37
+ // The focused cookie banner is the first element on the page and the last thing the user
38
+ // interacted with prior to it gaining focus.
39
+ // We therefore assume that moving focus to it is not going to surprise users, and that giving
40
+ // it a visible focus indicator could be more confusing than helpful, especially as the
41
+ // element is not normally keyboard operable.
42
+ //
43
+ // We have flagged this in the research section of the guidance as something to monitor.
44
+ //
45
+ // A related discussion: https://github.com/w3c/wcag/issues/1001
46
+ outline: none;
47
+ }
48
+ }
49
+ }
@@ -0,0 +1,2 @@
1
+ @import "../../base";
2
+ @import "./index";
@@ -0,0 +1,26 @@
1
+ @import "../error-message/index";
2
+ @import "../input/index";
3
+ @import "../hint/index";
4
+ @import "../label/index";
5
+
6
+ @include govuk-exports("govuk/component/date-input") {
7
+ .govuk-date-input {
8
+ @include govuk-clearfix;
9
+ // font-size: 0 removes whitespace caused by inline-block
10
+ font-size: 0;
11
+ }
12
+
13
+ .govuk-date-input__item {
14
+ display: inline-block;
15
+ margin-right: govuk-spacing(4);
16
+ margin-bottom: 0;
17
+ }
18
+
19
+ .govuk-date-input__label {
20
+ display: block;
21
+ }
22
+
23
+ .govuk-date-input__input {
24
+ margin-bottom: 0;
25
+ }
26
+ }
@@ -0,0 +1,2 @@
1
+ @import "../../base";
2
+ @import "./index";
@@ -0,0 +1,88 @@
1
+ @include govuk-exports("govuk/component/details") {
2
+ .govuk-details {
3
+ @include govuk-font($size: 19);
4
+ @include govuk-text-colour;
5
+ @include govuk-responsive-margin(6, "bottom");
6
+
7
+ display: block;
8
+ }
9
+
10
+ .govuk-details__summary {
11
+ // Make the focus outline shrink-wrap the text content of the summary
12
+ display: inline-block;
13
+
14
+ // Absolutely position the marker against this element
15
+ position: relative;
16
+
17
+ margin-bottom: govuk-spacing(1);
18
+
19
+ // Allow for absolutely positioned marker and align with disclosed text
20
+ padding-left: govuk-spacing(4) + $govuk-border-width;
21
+
22
+ // Style the summary to look like a link...
23
+ color: $govuk-link-colour;
24
+ cursor: pointer;
25
+
26
+ &:hover {
27
+ color: $govuk-link-hover-colour;
28
+ }
29
+
30
+ &:focus {
31
+ @include govuk-focused-text;
32
+ }
33
+ }
34
+
35
+ // ...but only underline the text, not the arrow
36
+ .govuk-details__summary-text {
37
+ @include govuk-link-decoration;
38
+ }
39
+
40
+ .govuk-details__summary:hover .govuk-details__summary-text {
41
+ @include govuk-link-hover-decoration;
42
+ }
43
+
44
+ // Remove the underline when focussed to avoid duplicate borders
45
+ .govuk-details__summary:focus .govuk-details__summary-text {
46
+ text-decoration: none;
47
+ }
48
+
49
+ // Remove the default details marker so we can style our own consistently and
50
+ // ensure it displays in Firefox (see implementation.md for details)
51
+ .govuk-details__summary::-webkit-details-marker {
52
+ display: none;
53
+ }
54
+
55
+ // Append our own open / closed marker using a pseudo-element
56
+ .govuk-details__summary:before {
57
+ content: "";
58
+ position: absolute;
59
+
60
+ top: -1px;
61
+ bottom: 0;
62
+ left: 0;
63
+
64
+ margin: auto;
65
+
66
+ @include govuk-shape-arrow($direction: right, $base: 14px);
67
+
68
+ .govuk-details[open] > & {
69
+ @include govuk-shape-arrow($direction: down, $base: 14px);
70
+ }
71
+ }
72
+
73
+ .govuk-details__text {
74
+ padding-top: govuk-spacing(3);
75
+ padding-bottom: govuk-spacing(3);
76
+ padding-left: govuk-spacing(4);
77
+ border-left: $govuk-border-width solid $govuk-border-colour;
78
+ }
79
+
80
+ .govuk-details__text p {
81
+ margin-top: 0;
82
+ margin-bottom: govuk-spacing(4);
83
+ }
84
+
85
+ .govuk-details__text > :last-child {
86
+ margin-bottom: 0;
87
+ }
88
+ }
@@ -0,0 +1,2 @@
1
+ @import "../../base";
2
+ @import "./index";
@@ -0,0 +1,12 @@
1
+ @include govuk-exports("govuk/component/error-message") {
2
+ .govuk-error-message {
3
+ @include govuk-font($size: 19, $weight: bold);
4
+
5
+ display: block;
6
+ margin-top: 0; // Reset any default browser margins for paragraphs
7
+ margin-bottom: govuk-spacing(3);
8
+ clear: both;
9
+
10
+ color: $govuk-error-colour;
11
+ }
12
+ }
@@ -0,0 +1,2 @@
1
+ @import "../../base";
2
+ @import "./index";
@@ -0,0 +1,43 @@
1
+ @import "../../core/lists";
2
+
3
+ @include govuk-exports("govuk/component/error-summary") {
4
+ .govuk-error-summary {
5
+ @include govuk-text-colour;
6
+ @include govuk-responsive-padding(4);
7
+ @include govuk-responsive-margin(8, "bottom");
8
+
9
+ border: $govuk-border-width solid $govuk-error-colour;
10
+
11
+ &:focus {
12
+ outline: $govuk-focus-width solid $govuk-focus-colour;
13
+ }
14
+ }
15
+
16
+ .govuk-error-summary__title {
17
+ @include govuk-font($size: 24, $weight: bold);
18
+
19
+ margin-top: 0;
20
+ @include govuk-responsive-margin(4, "bottom");
21
+ }
22
+
23
+ .govuk-error-summary__body {
24
+ @include govuk-font($size: 19);
25
+
26
+ p {
27
+ margin-top: 0;
28
+ @include govuk-responsive-margin(4, "bottom");
29
+ }
30
+ }
31
+
32
+ // Cross-component class - adjusts styling of list component
33
+ .govuk-error-summary__list {
34
+ margin-top: 0;
35
+ margin-bottom: 0;
36
+ }
37
+
38
+ .govuk-error-summary__list a {
39
+ @include govuk-typography-weight-bold;
40
+ @include govuk-link-common;
41
+ @include govuk-link-style-error;
42
+ }
43
+ }
@@ -0,0 +1,2 @@
1
+ @import "../../base";
2
+ @import "./index";
@@ -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
+ }
@@ -0,0 +1,2 @@
1
+ @import "../../base";
2
+ @import "./index";
@@ -0,0 +1,55 @@
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
+ max-width: 100%;
12
+ margin-left: -$component-padding;
13
+ padding: $component-padding;
14
+
15
+ // The default file upload button in Safari does not
16
+ // support setting a custom font-size. Set `-webkit-appearance`
17
+ // to `button` to drop out of the native appearance so the
18
+ // font-size is set to 19px
19
+ // https://bugs.webkit.org/show_bug.cgi?id=224746
20
+ &::-webkit-file-upload-button {
21
+ -webkit-appearance: button;
22
+ color: inherit;
23
+ font: inherit;
24
+ }
25
+
26
+ &:focus {
27
+ outline: $govuk-focus-width solid $govuk-focus-colour;
28
+ // Use `box-shadow` to add border instead of changing `border-width`
29
+ // (which changes element size) and since `outline` is already used for the
30
+ // yellow focus state.
31
+ box-shadow: inset 0 0 0 4px $govuk-input-border-colour;
32
+
33
+ @include _govuk-if-ie8 {
34
+ // IE8 doesn't support `box-shadow` so add an actual border
35
+ border: 4px solid $govuk-input-border-colour;
36
+ }
37
+ }
38
+
39
+ // Set "focus-within" to fix https://bugzilla.mozilla.org/show_bug.cgi?id=1430196
40
+ // so that component receives focus in Firefox.
41
+ // This can't be set together with `:focus` as all versions of IE fail
42
+ // to recognise `focus-within` and don't set any styles from the block
43
+ // when it's a selector.
44
+ &:focus-within {
45
+ outline: $govuk-focus-width solid $govuk-focus-colour;
46
+
47
+ box-shadow: inset 0 0 0 4px $govuk-input-border-colour;
48
+ }
49
+
50
+ &:disabled {
51
+ opacity: .5;
52
+ cursor: not-allowed;
53
+ }
54
+ }
55
+ }
@@ -0,0 +1,2 @@
1
+ @import "../../base";
2
+ @import "./index";
@@ -0,0 +1,193 @@
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: -ms-flexbox;
71
+ display: flex; // Support: Flexbox
72
+ margin-right: -$govuk-gutter-half;
73
+ margin-left: -$govuk-gutter-half;
74
+ -ms-flex-wrap: wrap;
75
+ flex-wrap: wrap; // Support: Flexbox
76
+ -ms-flex-align: end;
77
+ align-items: flex-end; // Support: Flexbox
78
+ -ms-flex-pack: center;
79
+ justify-content: center; // Support: Flexbox
80
+ }
81
+
82
+ .govuk-footer__meta-item {
83
+ margin-right: $govuk-gutter-half;
84
+ margin-bottom: govuk-spacing(5);
85
+ margin-left: $govuk-gutter-half;
86
+ }
87
+
88
+ .govuk-footer__meta-item--grow {
89
+ -ms-flex: 1;
90
+ flex: 1; // Support: Flexbox
91
+ @include govuk-media-query ($until: tablet) {
92
+ -ms-flex-preferred-size: 320px;
93
+ flex-basis: 320px; // Support: Flexbox
94
+ }
95
+ }
96
+
97
+ .govuk-footer__licence-logo {
98
+ display: inline-block;
99
+ margin-right: govuk-spacing(2);
100
+ @include govuk-media-query ($until: desktop) {
101
+ margin-bottom: govuk-spacing(3);
102
+ }
103
+ vertical-align: top;
104
+ // Work around SVGs not inheriting color from parent in forced color mode
105
+ // (https://github.com/w3c/csswg-drafts/issues/6310)
106
+ forced-color-adjust: auto;
107
+ }
108
+
109
+ .govuk-footer__licence-description {
110
+ display: inline-block;
111
+ }
112
+
113
+ .govuk-footer__copyright-logo {
114
+ display: inline-block;
115
+ min-width: $govuk-footer-crest-image-width;
116
+ padding-top: ($govuk-footer-crest-image-height + govuk-spacing(2));
117
+ background-image: govuk-image-url("govuk-crest.png");
118
+ @include govuk-device-pixel-ratio {
119
+ background-image: govuk-image-url("govuk-crest-2x.png");
120
+ }
121
+ background-repeat: no-repeat;
122
+ background-position: 50% 0%;
123
+ background-size: $govuk-footer-crest-image-width $govuk-footer-crest-image-height;
124
+ text-align: center;
125
+ white-space: nowrap;
126
+ }
127
+
128
+ .govuk-footer__inline-list {
129
+ margin-top: 0;
130
+ margin-bottom: govuk-spacing(3);
131
+ padding: 0;
132
+ }
133
+
134
+ .govuk-footer__meta-custom {
135
+ margin-bottom: govuk-spacing(4);
136
+ }
137
+
138
+ .govuk-footer__inline-list-item {
139
+ display: inline-block;
140
+ margin-right: govuk-spacing(3);
141
+ margin-bottom: govuk-spacing(1);
142
+ }
143
+
144
+ .govuk-footer__heading {
145
+ margin-bottom: govuk-spacing(6);
146
+ padding-bottom: govuk-spacing(4);
147
+
148
+ @include govuk-media-query ($until: tablet) {
149
+ padding-bottom: govuk-spacing(2);
150
+ }
151
+ border-bottom: 1px solid $govuk-footer-border;
152
+ }
153
+
154
+ .govuk-footer__navigation {
155
+ @include govuk-clearfix;
156
+ margin-right: -$govuk-gutter-half;
157
+ margin-left: -$govuk-gutter-half;
158
+ }
159
+
160
+ .govuk-footer__section {
161
+ display: inline-block;
162
+ margin-bottom: $govuk-gutter;
163
+ vertical-align: top;
164
+ }
165
+
166
+ .govuk-footer__list {
167
+ margin: 0;
168
+ padding: 0;
169
+ list-style: none;
170
+ -webkit-column-gap: $govuk-gutter;
171
+ column-gap: $govuk-gutter; // Support: Columns
172
+ }
173
+
174
+ @include govuk-media-query ($from: desktop) {
175
+ .govuk-footer__list--columns-2 {
176
+ -webkit-column-count: 2;
177
+ column-count: 2; // Support: Columns
178
+ }
179
+
180
+ .govuk-footer__list--columns-3 {
181
+ -webkit-column-count: 3;
182
+ column-count: 3; // Support: Columns
183
+ }
184
+ }
185
+
186
+ .govuk-footer__list-item {
187
+ @include govuk-responsive-margin(4, "bottom");
188
+ }
189
+
190
+ .govuk-footer__list-item:last-child {
191
+ margin-bottom: 0;
192
+ }
193
+ }
@@ -0,0 +1,2 @@
1
+ @import "../../base";
2
+ @import "./index";