govuk_tech_docs 2.2.0 → 2.4.0

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 (148) 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 +26 -1
  6. data/govuk_tech_docs.gemspec +3 -8
  7. data/lib/assets/javascripts/_modules/collapsible-navigation.js +7 -7
  8. data/lib/assets/javascripts/_modules/in-page-navigation.js +2 -4
  9. data/lib/assets/stylesheets/_govuk_tech_docs.scss +9 -10
  10. data/lib/assets/stylesheets/modules/_search.scss +8 -25
  11. data/lib/assets/stylesheets/modules/_technical-documentation.scss +1 -1
  12. data/lib/assets/stylesheets/modules/_toc.scss +11 -11
  13. data/lib/govuk_tech_docs/api_reference/api_reference_extension.rb +0 -1
  14. data/lib/govuk_tech_docs/api_reference/api_reference_renderer.rb +70 -186
  15. data/lib/govuk_tech_docs/api_reference/templates/api_reference_full.html.erb +3 -2
  16. data/lib/govuk_tech_docs/api_reference/templates/operation.html.erb +1 -1
  17. data/lib/govuk_tech_docs/api_reference/templates/parameters.html.erb +1 -1
  18. data/lib/govuk_tech_docs/api_reference/templates/responses.html.erb +1 -1
  19. data/lib/govuk_tech_docs/api_reference/templates/schema.html.erb +12 -12
  20. data/lib/govuk_tech_docs/table_of_contents/heading.rb +5 -1
  21. data/lib/govuk_tech_docs/table_of_contents/heading_tree_renderer.rb +2 -2
  22. data/lib/govuk_tech_docs/table_of_contents/helpers.rb +6 -3
  23. data/lib/govuk_tech_docs/tech_docs_html_renderer.rb +1 -1
  24. data/lib/govuk_tech_docs/version.rb +1 -1
  25. data/lib/source/layouts/_header.erb +6 -2
  26. data/lib/source/layouts/_search.erb +1 -1
  27. data/node_modules/govuk-frontend/govuk/_base.scss +3 -0
  28. data/node_modules/govuk-frontend/govuk/all.js +306 -94
  29. data/node_modules/govuk-frontend/govuk/all.scss +1 -3
  30. data/node_modules/govuk-frontend/govuk/components/_all.scss +33 -29
  31. data/node_modules/govuk-frontend/govuk/components/accordion/_accordion.scss +2 -208
  32. data/node_modules/govuk-frontend/govuk/components/accordion/_index.scss +197 -0
  33. data/node_modules/govuk-frontend/govuk/components/accordion/accordion.js +1 -1
  34. data/node_modules/govuk-frontend/govuk/components/back-link/_back-link.scss +2 -65
  35. data/node_modules/govuk-frontend/govuk/components/back-link/_index.scss +99 -0
  36. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/_breadcrumbs.scss +2 -118
  37. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/_index.scss +138 -0
  38. data/node_modules/govuk-frontend/govuk/components/button/_button.scss +2 -284
  39. data/node_modules/govuk-frontend/govuk/components/button/_index.scss +288 -0
  40. data/node_modules/govuk-frontend/govuk/components/character-count/_character-count.scss +2 -31
  41. data/node_modules/govuk-frontend/govuk/components/character-count/_index.scss +25 -0
  42. data/node_modules/govuk-frontend/govuk/components/character-count/character-count.js +17 -9
  43. data/node_modules/govuk-frontend/govuk/components/checkboxes/_checkboxes.scss +2 -308
  44. data/node_modules/govuk-frontend/govuk/components/checkboxes/_index.scss +320 -0
  45. data/node_modules/govuk-frontend/govuk/components/checkboxes/checkboxes.js +129 -24
  46. data/node_modules/govuk-frontend/govuk/components/cookie-banner/_cookie-banner.scss +2 -0
  47. data/node_modules/govuk-frontend/govuk/components/cookie-banner/_index.scss +51 -0
  48. data/node_modules/govuk-frontend/govuk/components/date-input/_date-input.scss +2 -30
  49. data/node_modules/govuk-frontend/govuk/components/date-input/_index.scss +26 -0
  50. data/node_modules/govuk-frontend/govuk/components/details/_details.scss +2 -88
  51. data/node_modules/govuk-frontend/govuk/components/details/_index.scss +87 -0
  52. data/node_modules/govuk-frontend/govuk/components/error-message/_error-message.scss +2 -15
  53. data/node_modules/govuk-frontend/govuk/components/error-message/_index.scss +11 -0
  54. data/node_modules/govuk-frontend/govuk/components/error-summary/_error-summary.scss +2 -59
  55. data/node_modules/govuk-frontend/govuk/components/error-summary/_index.scss +43 -0
  56. data/node_modules/govuk-frontend/govuk/components/fieldset/_fieldset.scss +2 -68
  57. data/node_modules/govuk-frontend/govuk/components/fieldset/_index.scss +64 -0
  58. data/node_modules/govuk-frontend/govuk/components/file-upload/_file-upload.scss +2 -81
  59. data/node_modules/govuk-frontend/govuk/components/file-upload/_index.scss +49 -0
  60. data/node_modules/govuk-frontend/govuk/components/footer/_footer.scss +2 -244
  61. data/node_modules/govuk-frontend/govuk/components/footer/_index.scss +241 -0
  62. data/node_modules/govuk-frontend/govuk/components/header/_header.scss +2 -318
  63. data/node_modules/govuk-frontend/govuk/components/header/_index.scss +331 -0
  64. data/node_modules/govuk-frontend/govuk/components/header/header.js +665 -316
  65. data/node_modules/govuk-frontend/govuk/components/hint/_hint.scss +2 -50
  66. data/node_modules/govuk-frontend/govuk/components/hint/_index.scss +44 -0
  67. data/node_modules/govuk-frontend/govuk/components/input/_index.scss +191 -0
  68. data/node_modules/govuk-frontend/govuk/components/input/_input.scss +2 -103
  69. data/node_modules/govuk-frontend/govuk/components/inset-text/_index.scss +24 -0
  70. data/node_modules/govuk-frontend/govuk/components/inset-text/_inset-text.scss +2 -28
  71. data/node_modules/govuk-frontend/govuk/components/label/_index.scss +41 -0
  72. data/node_modules/govuk-frontend/govuk/components/label/_label.scss +2 -45
  73. data/node_modules/govuk-frontend/govuk/components/notification-banner/_index.scss +89 -0
  74. data/node_modules/govuk-frontend/govuk/components/notification-banner/_notification-banner.scss +2 -0
  75. data/node_modules/govuk-frontend/govuk/components/notification-banner/notification-banner.js +61 -0
  76. data/node_modules/govuk-frontend/govuk/components/panel/_index.scss +44 -0
  77. data/node_modules/govuk-frontend/govuk/components/panel/_panel.scss +2 -44
  78. data/node_modules/govuk-frontend/govuk/components/phase-banner/_index.scss +27 -0
  79. data/node_modules/govuk-frontend/govuk/components/phase-banner/_phase-banner.scss +2 -31
  80. data/node_modules/govuk-frontend/govuk/components/radios/_index.scss +342 -0
  81. data/node_modules/govuk-frontend/govuk/components/radios/_radios.scss +2 -346
  82. data/node_modules/govuk-frontend/govuk/components/radios/radios.js +76 -28
  83. data/node_modules/govuk-frontend/govuk/components/select/_index.scss +49 -0
  84. data/node_modules/govuk-frontend/govuk/components/select/_select.scss +2 -57
  85. data/node_modules/govuk-frontend/govuk/components/skip-link/_index.scss +36 -0
  86. data/node_modules/govuk-frontend/govuk/components/skip-link/_skip-link.scss +2 -37
  87. data/node_modules/govuk-frontend/govuk/components/summary-list/_index.scss +145 -0
  88. data/node_modules/govuk-frontend/govuk/components/summary-list/_summary-list.scss +2 -157
  89. data/node_modules/govuk-frontend/govuk/components/table/_index.scss +71 -0
  90. data/node_modules/govuk-frontend/govuk/components/table/_table.scss +2 -54
  91. data/node_modules/govuk-frontend/govuk/components/tabs/_index.scss +130 -0
  92. data/node_modules/govuk-frontend/govuk/components/tabs/_tabs.scss +2 -142
  93. data/node_modules/govuk-frontend/govuk/components/tag/_index.scss +86 -0
  94. data/node_modules/govuk-frontend/govuk/components/tag/_tag.scss +2 -91
  95. data/node_modules/govuk-frontend/govuk/components/textarea/_index.scss +47 -0
  96. data/node_modules/govuk-frontend/govuk/components/textarea/_textarea.scss +2 -55
  97. data/node_modules/govuk-frontend/govuk/components/warning-text/_index.scss +66 -0
  98. data/node_modules/govuk-frontend/govuk/components/warning-text/_warning-text.scss +2 -60
  99. data/node_modules/govuk-frontend/govuk/core/_global-styles.scss +5 -3
  100. data/node_modules/govuk-frontend/govuk/core/_links.scss +13 -3
  101. data/node_modules/govuk-frontend/govuk/core/_lists.scss +17 -3
  102. data/node_modules/govuk-frontend/govuk/core/_section-break.scss +5 -3
  103. data/node_modules/govuk-frontend/govuk/core/_template.scss +5 -4
  104. data/node_modules/govuk-frontend/govuk/core/_typography.scss +5 -3
  105. data/node_modules/govuk-frontend/govuk/helpers/_clearfix.scss +1 -1
  106. data/node_modules/govuk-frontend/govuk/helpers/_colour.scss +1 -1
  107. data/node_modules/govuk-frontend/govuk/helpers/_device-pixels.scss +3 -3
  108. data/node_modules/govuk-frontend/govuk/helpers/_focused.scss +1 -1
  109. data/node_modules/govuk-frontend/govuk/helpers/_font-faces.scss +9 -11
  110. data/node_modules/govuk-frontend/govuk/helpers/_grid.scss +2 -1
  111. data/node_modules/govuk-frontend/govuk/helpers/_links.scss +246 -33
  112. data/node_modules/govuk-frontend/govuk/helpers/_media-queries.scss +2 -6
  113. data/node_modules/govuk-frontend/govuk/helpers/_shape-arrow.scss +1 -1
  114. data/node_modules/govuk-frontend/govuk/helpers/_spacing.scss +3 -2
  115. data/node_modules/govuk-frontend/govuk/helpers/_typography.scss +8 -7
  116. data/node_modules/govuk-frontend/govuk/helpers/_visually-hidden.scss +1 -1
  117. data/node_modules/govuk-frontend/govuk/objects/_all.scss +1 -0
  118. data/node_modules/govuk-frontend/govuk/objects/_button-group.scss +101 -0
  119. data/node_modules/govuk-frontend/govuk/objects/_form-group.scss +1 -4
  120. data/node_modules/govuk-frontend/govuk/objects/_grid.scss +3 -6
  121. data/node_modules/govuk-frontend/govuk/objects/_main-wrapper.scss +5 -4
  122. data/node_modules/govuk-frontend/govuk/objects/_width-container.scss +6 -4
  123. data/node_modules/govuk-frontend/govuk/overrides/_display.scss +6 -4
  124. data/node_modules/govuk-frontend/govuk/overrides/_spacing.scss +5 -3
  125. data/node_modules/govuk-frontend/govuk/overrides/_typography.scss +5 -3
  126. data/node_modules/govuk-frontend/govuk/overrides/_width.scss +6 -3
  127. data/node_modules/govuk-frontend/govuk/settings/_all.scss +2 -0
  128. data/node_modules/govuk-frontend/govuk/settings/_colours-applied.scss +11 -5
  129. data/node_modules/govuk-frontend/govuk/settings/_colours-organisations.scss +3 -0
  130. data/node_modules/govuk-frontend/govuk/settings/_colours-palette.scss +42 -35
  131. data/node_modules/govuk-frontend/govuk/settings/_compatibility.scss +0 -1
  132. data/node_modules/govuk-frontend/govuk/settings/_ie8.scss +1 -1
  133. data/node_modules/govuk-frontend/govuk/settings/_links.scss +62 -0
  134. data/node_modules/govuk-frontend/govuk/settings/_measurements.scss +4 -5
  135. data/node_modules/govuk-frontend/govuk/settings/_typography-font-families.scss +2 -2
  136. data/node_modules/govuk-frontend/govuk/settings/_typography-font.scss +14 -5
  137. data/node_modules/govuk-frontend/govuk/settings/_typography-responsive.scss +6 -2
  138. data/node_modules/govuk-frontend/govuk/tools/_compatibility.scss +1 -1
  139. data/node_modules/govuk-frontend/govuk/tools/_font-url.scss +1 -4
  140. data/node_modules/govuk-frontend/govuk/tools/_ie8.scss +1 -1
  141. data/node_modules/govuk-frontend/govuk/tools/_image-url.scss +1 -4
  142. data/node_modules/govuk-frontend/govuk/tools/_px-to-em.scss +1 -1
  143. data/node_modules/govuk-frontend/govuk/tools/_px-to-rem.scss +1 -1
  144. data/node_modules/govuk-frontend/govuk/utilities/_visually-hidden.scss +0 -1
  145. data/node_modules/govuk-frontend/govuk/vendor/_sass-mq.scss +0 -4
  146. data/package-lock.json +358 -288
  147. data/package.json +2 -2
  148. metadata +48 -67
@@ -0,0 +1,2 @@
1
+ @import "../../base";
2
+ @import "./index";
@@ -0,0 +1,51 @@
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
+ @include govuk-font($size: 19);
8
+
9
+ padding-top: govuk-spacing(4);
10
+ // The component does not set bottom spacing.
11
+ // The bottom spacing should be created by the items inside the component.
12
+
13
+ // Visually separate the cookie banner from content underneath
14
+ // when user changes colours in their browser.
15
+ border-bottom: $border-bottom-width solid transparent;
16
+
17
+ background-color: govuk-colour("light-grey", $legacy: "grey-3");
18
+ }
19
+
20
+ // Support older browsers which don't hide elements with the `hidden` attribute
21
+ // when user hides the whole cookie banner with a 'Hide' button.
22
+ .govuk-cookie-banner[hidden] {
23
+ display: none;
24
+ }
25
+
26
+ .govuk-cookie-banner__message {
27
+ // Remove the extra height added by the separator border.
28
+ margin-bottom: -$border-bottom-width;
29
+
30
+ &[hidden] {
31
+ // Support older browsers which don't hide elements with the `hidden` attribute
32
+ // when the visibility of cookie and replacement messages is toggled.
33
+ display: none;
34
+ }
35
+
36
+ &:focus {
37
+ // Remove the native visible focus indicator when the element is programmatically focused.
38
+ //
39
+ // The focused cookie banner is the first element on the page and the last thing the user
40
+ // interacted with prior to it gaining focus.
41
+ // We therefore assume that moving focus to it is not going to surprise users, and that giving
42
+ // it a visible focus indicator could be more confusing than helpful, especially as the
43
+ // element is not normally keyboard operable.
44
+ //
45
+ // We have flagged this in the research section of the guidance as something to monitor.
46
+ //
47
+ // A related discussion: https://github.com/w3c/wcag/issues/1001
48
+ outline: none;
49
+ }
50
+ }
51
+ }
@@ -1,30 +1,2 @@
1
- @import "../../settings/all";
2
- @import "../../tools/all";
3
- @import "../../helpers/all";
4
-
5
- @import "../error-message/error-message";
6
- @import "../input/input";
7
- @import "../hint/hint";
8
- @import "../label/label";
9
-
10
- @include govuk-exports("govuk/component/date-input") {
11
- .govuk-date-input {
12
- @include govuk-clearfix;
13
- // font-size: 0 removes whitespace caused by inline-block
14
- font-size: 0;
15
- }
16
-
17
- .govuk-date-input__item {
18
- display: inline-block;
19
- margin-right: govuk-spacing(4);
20
- margin-bottom: 0;
21
- }
22
-
23
- .govuk-date-input__label {
24
- display: block;
25
- }
26
-
27
- .govuk-date-input__input {
28
- margin-bottom: 0;
29
- }
30
- }
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
+ }
@@ -1,88 +1,2 @@
1
- @import "../../settings/all";
2
- @import "../../tools/all";
3
- @import "../../helpers/all";
4
-
5
- @include govuk-exports("govuk/component/details") {
6
-
7
- .govuk-details {
8
- @include govuk-font($size: 19);
9
- @include govuk-text-colour;
10
- @include govuk-responsive-margin(6, "bottom");
11
-
12
- display: block;
13
- }
14
-
15
- .govuk-details__summary {
16
- // Make the focus outline shrink-wrap the text content of the summary
17
- display: inline-block;
18
-
19
- // Absolutely position the marker against this element
20
- position: relative;
21
-
22
- margin-bottom: govuk-spacing(1);
23
-
24
- // Allow for absolutely positioned marker and align with disclosed text
25
- padding-left: govuk-spacing(4) + $govuk-border-width;
26
-
27
- // Style the summary to look like a link...
28
- color: $govuk-link-colour;
29
- cursor: pointer;
30
-
31
- &:hover {
32
- color: $govuk-link-hover-colour;
33
- }
34
-
35
- &:focus {
36
- @include govuk-focused-text;
37
- }
38
- }
39
-
40
- // ...but only underline the text, not the arrow
41
- .govuk-details__summary-text {
42
- text-decoration: underline;
43
- }
44
-
45
- // Remove the underline when focussed to avoid duplicate borders
46
- .govuk-details__summary:focus .govuk-details__summary-text {
47
- text-decoration: none;
48
- }
49
-
50
- // Remove the default details marker so we can style our own consistently and
51
- // ensure it displays in Firefox (see implementation.md for details)
52
- .govuk-details__summary::-webkit-details-marker {
53
- display: none;
54
- }
55
-
56
- // Append our own open / closed marker using a pseudo-element
57
- .govuk-details__summary:before {
58
- content: "";
59
- position: absolute;
60
-
61
- top: -1px;
62
- bottom: 0;
63
- left: 0;
64
-
65
- margin: auto;
66
-
67
- @include govuk-shape-arrow($direction: right, $base: 14px);
68
-
69
- .govuk-details[open] > & {
70
- @include govuk-shape-arrow($direction: down, $base: 14px);
71
- }
72
- }
73
-
74
- .govuk-details__text {
75
- padding: 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
- }
1
+ @import "../../base";
2
+ @import "./index";
@@ -0,0 +1,87 @@
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: govuk-spacing(3);
75
+ padding-left: govuk-spacing(4);
76
+ border-left: $govuk-border-width solid $govuk-border-colour;
77
+ }
78
+
79
+ .govuk-details__text p {
80
+ margin-top: 0;
81
+ margin-bottom: govuk-spacing(4);
82
+ }
83
+
84
+ .govuk-details__text > :last-child {
85
+ margin-bottom: 0;
86
+ }
87
+ }
@@ -1,15 +1,2 @@
1
- @import "../../settings/all";
2
- @import "../../tools/all";
3
- @import "../../helpers/all";
4
-
5
- @include govuk-exports("govuk/component/error-message") {
6
- .govuk-error-message {
7
- @include govuk-font($size: 19, $weight: bold);
8
-
9
- display: block;
10
- margin-bottom: govuk-spacing(3);
11
- clear: both;
12
-
13
- color: $govuk-error-colour;
14
- }
15
- }
1
+ @import "../../base";
2
+ @import "./index";
@@ -0,0 +1,11 @@
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-bottom: govuk-spacing(3);
7
+ clear: both;
8
+
9
+ color: $govuk-error-colour;
10
+ }
11
+ }
@@ -1,59 +1,2 @@
1
- @import "../../settings/all";
2
- @import "../../tools/all";
3
- @import "../../helpers/all";
4
-
5
- @import "../../core/lists";
6
-
7
- @include govuk-exports("govuk/component/error-summary") {
8
-
9
- .govuk-error-summary {
10
- @include govuk-text-colour;
11
- @include govuk-responsive-padding(4);
12
- @include govuk-responsive-margin(8, "bottom");
13
-
14
- border: $govuk-border-width solid $govuk-error-colour;
15
-
16
- &:focus {
17
- outline: $govuk-focus-width solid $govuk-focus-colour;
18
- }
19
- }
20
-
21
- .govuk-error-summary__title {
22
- @include govuk-font($size: 24, $weight: bold);
23
-
24
- margin-top: 0;
25
- @include govuk-responsive-margin(4, "bottom");
26
- }
27
-
28
- .govuk-error-summary__body {
29
- @include govuk-font($size: 19);
30
-
31
- p {
32
- margin-top: 0;
33
- @include govuk-responsive-margin(4, "bottom");
34
- }
35
- }
36
-
37
- // Cross-component class - adjusts styling of list component
38
- .govuk-error-summary__list {
39
- margin-top: 0;
40
- margin-bottom: 0;
41
- }
42
-
43
- .govuk-error-summary__list a {
44
- @include govuk-typography-weight-bold;
45
-
46
- // Override default link styling to use error colour
47
- &:link,
48
- &:visited,
49
- &:hover,
50
- &:active {
51
- color: $govuk-error-colour;
52
- }
53
-
54
- &:focus {
55
- @include govuk-focused-text;
56
- }
57
- }
58
-
59
- }
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
+ }
@@ -1,68 +1,2 @@
1
- @import "../../settings/all";
2
- @import "../../tools/all";
3
- @import "../../helpers/all";
4
-
5
- @include govuk-exports("govuk/component/fieldset") {
6
- .govuk-fieldset {
7
- min-width: 0;
8
- margin: 0;
9
- padding: 0;
10
- border: 0;
11
- @include govuk-clearfix;
12
- }
13
-
14
- // Fix for Firefox < 53
15
- // https://bugzilla.mozilla.org/show_bug.cgi?id=504622
16
- @supports not (caret-color: auto) {
17
- .govuk-fieldset,
18
- x:-moz-any-link {
19
- display: table-cell;
20
- }
21
- }
22
-
23
- .govuk-fieldset__legend {
24
- @include govuk-font($size: 19);
25
- @include govuk-text-colour;
26
-
27
- // Fix legend text wrapping in Edge and IE
28
- // 1. IE9-11 & Edge 12-13
29
- // 2. IE8-11
30
- box-sizing: border-box; // 1
31
- display: table; // 2
32
- max-width: 100%; // 1
33
- margin-bottom: govuk-spacing(2);
34
- padding: 0;
35
-
36
- white-space: normal; // 1
37
- }
38
-
39
- // Modifiers that make legends look more like their equivalent headings
40
-
41
- .govuk-fieldset__legend--xl {
42
- @include govuk-font($size: 48, $weight: bold);
43
- margin-bottom: govuk-spacing(3);
44
- }
45
-
46
- .govuk-fieldset__legend--l {
47
- @include govuk-font($size: 36, $weight: bold);
48
- margin-bottom: govuk-spacing(3);
49
- }
50
-
51
- .govuk-fieldset__legend--m {
52
- @include govuk-font($size: 24, $weight: bold);
53
- margin-bottom: govuk-spacing(3);
54
- }
55
-
56
- .govuk-fieldset__legend--s {
57
- @include govuk-font($size: 19, $weight: bold);
58
- }
59
-
60
- // When the legend contains an H1, we want the H1 to inherit all styles from
61
- // the legend. Effectively we want to be able to treat the heading as if it is
62
- // not there.
63
- .govuk-fieldset__heading {
64
- margin: 0;
65
- font-size: inherit;
66
- font-weight: inherit;
67
- }
68
- }
1
+ @import "../../base";
2
+ @import "./index";