govuk_tech_docs 2.2.1 → 2.4.1

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 (141) 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 +25 -0
  6. data/govuk_tech_docs.gemspec +2 -1
  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/table_of_contents/heading.rb +5 -1
  14. data/lib/govuk_tech_docs/table_of_contents/heading_tree_renderer.rb +2 -2
  15. data/lib/govuk_tech_docs/table_of_contents/helpers.rb +6 -3
  16. data/lib/govuk_tech_docs/tech_docs_html_renderer.rb +1 -1
  17. data/lib/govuk_tech_docs/version.rb +1 -1
  18. data/lib/source/layouts/_header.erb +1 -2
  19. data/lib/source/layouts/_search.erb +1 -1
  20. data/node_modules/govuk-frontend/govuk/_base.scss +3 -0
  21. data/node_modules/govuk-frontend/govuk/all.js +306 -94
  22. data/node_modules/govuk-frontend/govuk/all.scss +1 -3
  23. data/node_modules/govuk-frontend/govuk/components/_all.scss +33 -29
  24. data/node_modules/govuk-frontend/govuk/components/accordion/_accordion.scss +2 -208
  25. data/node_modules/govuk-frontend/govuk/components/accordion/_index.scss +197 -0
  26. data/node_modules/govuk-frontend/govuk/components/accordion/accordion.js +1 -1
  27. data/node_modules/govuk-frontend/govuk/components/back-link/_back-link.scss +2 -65
  28. data/node_modules/govuk-frontend/govuk/components/back-link/_index.scss +99 -0
  29. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/_breadcrumbs.scss +2 -118
  30. data/node_modules/govuk-frontend/govuk/components/breadcrumbs/_index.scss +138 -0
  31. data/node_modules/govuk-frontend/govuk/components/button/_button.scss +2 -284
  32. data/node_modules/govuk-frontend/govuk/components/button/_index.scss +288 -0
  33. data/node_modules/govuk-frontend/govuk/components/character-count/_character-count.scss +2 -31
  34. data/node_modules/govuk-frontend/govuk/components/character-count/_index.scss +25 -0
  35. data/node_modules/govuk-frontend/govuk/components/character-count/character-count.js +17 -9
  36. data/node_modules/govuk-frontend/govuk/components/checkboxes/_checkboxes.scss +2 -308
  37. data/node_modules/govuk-frontend/govuk/components/checkboxes/_index.scss +320 -0
  38. data/node_modules/govuk-frontend/govuk/components/checkboxes/checkboxes.js +129 -24
  39. data/node_modules/govuk-frontend/govuk/components/cookie-banner/_cookie-banner.scss +2 -0
  40. data/node_modules/govuk-frontend/govuk/components/cookie-banner/_index.scss +51 -0
  41. data/node_modules/govuk-frontend/govuk/components/date-input/_date-input.scss +2 -30
  42. data/node_modules/govuk-frontend/govuk/components/date-input/_index.scss +26 -0
  43. data/node_modules/govuk-frontend/govuk/components/details/_details.scss +2 -88
  44. data/node_modules/govuk-frontend/govuk/components/details/_index.scss +87 -0
  45. data/node_modules/govuk-frontend/govuk/components/error-message/_error-message.scss +2 -15
  46. data/node_modules/govuk-frontend/govuk/components/error-message/_index.scss +11 -0
  47. data/node_modules/govuk-frontend/govuk/components/error-summary/_error-summary.scss +2 -59
  48. data/node_modules/govuk-frontend/govuk/components/error-summary/_index.scss +43 -0
  49. data/node_modules/govuk-frontend/govuk/components/fieldset/_fieldset.scss +2 -68
  50. data/node_modules/govuk-frontend/govuk/components/fieldset/_index.scss +64 -0
  51. data/node_modules/govuk-frontend/govuk/components/file-upload/_file-upload.scss +2 -81
  52. data/node_modules/govuk-frontend/govuk/components/file-upload/_index.scss +49 -0
  53. data/node_modules/govuk-frontend/govuk/components/footer/_footer.scss +2 -244
  54. data/node_modules/govuk-frontend/govuk/components/footer/_index.scss +241 -0
  55. data/node_modules/govuk-frontend/govuk/components/header/_header.scss +2 -318
  56. data/node_modules/govuk-frontend/govuk/components/header/_index.scss +331 -0
  57. data/node_modules/govuk-frontend/govuk/components/header/header.js +665 -316
  58. data/node_modules/govuk-frontend/govuk/components/hint/_hint.scss +2 -50
  59. data/node_modules/govuk-frontend/govuk/components/hint/_index.scss +44 -0
  60. data/node_modules/govuk-frontend/govuk/components/input/_index.scss +191 -0
  61. data/node_modules/govuk-frontend/govuk/components/input/_input.scss +2 -103
  62. data/node_modules/govuk-frontend/govuk/components/inset-text/_index.scss +24 -0
  63. data/node_modules/govuk-frontend/govuk/components/inset-text/_inset-text.scss +2 -28
  64. data/node_modules/govuk-frontend/govuk/components/label/_index.scss +41 -0
  65. data/node_modules/govuk-frontend/govuk/components/label/_label.scss +2 -45
  66. data/node_modules/govuk-frontend/govuk/components/notification-banner/_index.scss +89 -0
  67. data/node_modules/govuk-frontend/govuk/components/notification-banner/_notification-banner.scss +2 -0
  68. data/node_modules/govuk-frontend/govuk/components/notification-banner/notification-banner.js +61 -0
  69. data/node_modules/govuk-frontend/govuk/components/panel/_index.scss +44 -0
  70. data/node_modules/govuk-frontend/govuk/components/panel/_panel.scss +2 -44
  71. data/node_modules/govuk-frontend/govuk/components/phase-banner/_index.scss +27 -0
  72. data/node_modules/govuk-frontend/govuk/components/phase-banner/_phase-banner.scss +2 -31
  73. data/node_modules/govuk-frontend/govuk/components/radios/_index.scss +342 -0
  74. data/node_modules/govuk-frontend/govuk/components/radios/_radios.scss +2 -346
  75. data/node_modules/govuk-frontend/govuk/components/radios/radios.js +76 -28
  76. data/node_modules/govuk-frontend/govuk/components/select/_index.scss +49 -0
  77. data/node_modules/govuk-frontend/govuk/components/select/_select.scss +2 -57
  78. data/node_modules/govuk-frontend/govuk/components/skip-link/_index.scss +36 -0
  79. data/node_modules/govuk-frontend/govuk/components/skip-link/_skip-link.scss +2 -37
  80. data/node_modules/govuk-frontend/govuk/components/summary-list/_index.scss +145 -0
  81. data/node_modules/govuk-frontend/govuk/components/summary-list/_summary-list.scss +2 -157
  82. data/node_modules/govuk-frontend/govuk/components/table/_index.scss +71 -0
  83. data/node_modules/govuk-frontend/govuk/components/table/_table.scss +2 -54
  84. data/node_modules/govuk-frontend/govuk/components/tabs/_index.scss +130 -0
  85. data/node_modules/govuk-frontend/govuk/components/tabs/_tabs.scss +2 -142
  86. data/node_modules/govuk-frontend/govuk/components/tag/_index.scss +86 -0
  87. data/node_modules/govuk-frontend/govuk/components/tag/_tag.scss +2 -91
  88. data/node_modules/govuk-frontend/govuk/components/textarea/_index.scss +47 -0
  89. data/node_modules/govuk-frontend/govuk/components/textarea/_textarea.scss +2 -55
  90. data/node_modules/govuk-frontend/govuk/components/warning-text/_index.scss +66 -0
  91. data/node_modules/govuk-frontend/govuk/components/warning-text/_warning-text.scss +2 -60
  92. data/node_modules/govuk-frontend/govuk/core/_global-styles.scss +5 -3
  93. data/node_modules/govuk-frontend/govuk/core/_links.scss +13 -3
  94. data/node_modules/govuk-frontend/govuk/core/_lists.scss +17 -3
  95. data/node_modules/govuk-frontend/govuk/core/_section-break.scss +5 -3
  96. data/node_modules/govuk-frontend/govuk/core/_template.scss +5 -4
  97. data/node_modules/govuk-frontend/govuk/core/_typography.scss +5 -3
  98. data/node_modules/govuk-frontend/govuk/helpers/_clearfix.scss +1 -1
  99. data/node_modules/govuk-frontend/govuk/helpers/_colour.scss +1 -1
  100. data/node_modules/govuk-frontend/govuk/helpers/_device-pixels.scss +3 -3
  101. data/node_modules/govuk-frontend/govuk/helpers/_focused.scss +1 -1
  102. data/node_modules/govuk-frontend/govuk/helpers/_font-faces.scss +9 -11
  103. data/node_modules/govuk-frontend/govuk/helpers/_grid.scss +2 -1
  104. data/node_modules/govuk-frontend/govuk/helpers/_links.scss +246 -33
  105. data/node_modules/govuk-frontend/govuk/helpers/_media-queries.scss +2 -6
  106. data/node_modules/govuk-frontend/govuk/helpers/_shape-arrow.scss +1 -1
  107. data/node_modules/govuk-frontend/govuk/helpers/_spacing.scss +3 -2
  108. data/node_modules/govuk-frontend/govuk/helpers/_typography.scss +8 -7
  109. data/node_modules/govuk-frontend/govuk/helpers/_visually-hidden.scss +1 -1
  110. data/node_modules/govuk-frontend/govuk/objects/_all.scss +1 -0
  111. data/node_modules/govuk-frontend/govuk/objects/_button-group.scss +101 -0
  112. data/node_modules/govuk-frontend/govuk/objects/_form-group.scss +1 -4
  113. data/node_modules/govuk-frontend/govuk/objects/_grid.scss +3 -6
  114. data/node_modules/govuk-frontend/govuk/objects/_main-wrapper.scss +5 -4
  115. data/node_modules/govuk-frontend/govuk/objects/_width-container.scss +6 -4
  116. data/node_modules/govuk-frontend/govuk/overrides/_display.scss +6 -4
  117. data/node_modules/govuk-frontend/govuk/overrides/_spacing.scss +5 -3
  118. data/node_modules/govuk-frontend/govuk/overrides/_typography.scss +5 -3
  119. data/node_modules/govuk-frontend/govuk/overrides/_width.scss +6 -3
  120. data/node_modules/govuk-frontend/govuk/settings/_all.scss +2 -0
  121. data/node_modules/govuk-frontend/govuk/settings/_colours-applied.scss +11 -5
  122. data/node_modules/govuk-frontend/govuk/settings/_colours-organisations.scss +3 -0
  123. data/node_modules/govuk-frontend/govuk/settings/_colours-palette.scss +42 -35
  124. data/node_modules/govuk-frontend/govuk/settings/_compatibility.scss +0 -1
  125. data/node_modules/govuk-frontend/govuk/settings/_ie8.scss +1 -1
  126. data/node_modules/govuk-frontend/govuk/settings/_links.scss +62 -0
  127. data/node_modules/govuk-frontend/govuk/settings/_measurements.scss +4 -5
  128. data/node_modules/govuk-frontend/govuk/settings/_typography-font-families.scss +2 -2
  129. data/node_modules/govuk-frontend/govuk/settings/_typography-font.scss +14 -5
  130. data/node_modules/govuk-frontend/govuk/settings/_typography-responsive.scss +6 -2
  131. data/node_modules/govuk-frontend/govuk/tools/_compatibility.scss +1 -1
  132. data/node_modules/govuk-frontend/govuk/tools/_font-url.scss +1 -4
  133. data/node_modules/govuk-frontend/govuk/tools/_ie8.scss +1 -1
  134. data/node_modules/govuk-frontend/govuk/tools/_image-url.scss +1 -4
  135. data/node_modules/govuk-frontend/govuk/tools/_px-to-em.scss +1 -1
  136. data/node_modules/govuk-frontend/govuk/tools/_px-to-rem.scss +1 -1
  137. data/node_modules/govuk-frontend/govuk/utilities/_visually-hidden.scss +0 -1
  138. data/node_modules/govuk-frontend/govuk/vendor/_sass-mq.scss +0 -4
  139. data/package-lock.json +358 -288
  140. data/package.json +2 -2
  141. metadata +55 -4
@@ -876,7 +876,7 @@ Accordion.prototype.initHeaderAttributes = function ($headerWrapper, index) {
876
876
  icon.className = this.iconClass;
877
877
  icon.setAttribute('aria-hidden', 'true');
878
878
 
879
- $heading.appendChild(icon);
879
+ $button.appendChild(icon);
880
880
  };
881
881
 
882
882
  // When section toggled, set and store state
@@ -1,65 +1,2 @@
1
- @import "../../settings/all";
2
- @import "../../tools/all";
3
- @import "../../helpers/all";
4
-
5
- @include govuk-exports("govuk/component/back-link") {
6
-
7
- .govuk-back-link {
8
- @include govuk-typography-responsive($size: 16);
9
- @include govuk-link-common;
10
- @include govuk-link-style-text;
11
-
12
- display: inline-block;
13
- position: relative;
14
-
15
- margin-top: govuk-spacing(3);
16
- margin-bottom: govuk-spacing(3);
17
-
18
- // Allow space for the arrow
19
- padding-left: 14px;
20
- }
21
-
22
- // Only add a custom underline if the component is linkable
23
- .govuk-back-link[href] {
24
- // Use border-bottom rather than text-decoration so that the arrow is
25
- // underlined as well.
26
- border-bottom: 1px solid govuk-colour("black");
27
-
28
- // Underline is provided by a bottom border
29
- text-decoration: none;
30
-
31
- // When the back link is focused, hide the bottom link border as the
32
- // focus styles has a bottom border.
33
- &:focus {
34
- border-bottom-color: transparent;
35
- }
36
- }
37
-
38
- // Prepend left pointing arrow
39
- .govuk-back-link:before {
40
- @include govuk-shape-arrow($direction: left, $base: 10px, $height: 6px);
41
-
42
- content: "";
43
-
44
- // Vertically align with the parent element
45
- position: absolute;
46
-
47
- top: 0;
48
- bottom: 0;
49
- left: 0;
50
-
51
- margin: auto;
52
- }
53
-
54
- @if $govuk-use-legacy-font {
55
- // Begin adjustments for font baseline offset
56
- // These should be removed when legacy font support is dropped
57
- .govuk-back-link:before {
58
- $offset: 1px;
59
-
60
- top: $offset * -1;
61
- bottom: $offset;
62
- }
63
- }
64
-
65
- }
1
+ @import "../../base";
2
+ @import "./index";
@@ -0,0 +1,99 @@
1
+ @include govuk-exports("govuk/component/back-link") {
2
+
3
+ // Size of chevron (excluding border)
4
+ $chevron-size: 7px;
5
+
6
+ // Size of chevron border
7
+ $chevron-border-width: 1px;
8
+
9
+ // Colour of chevron
10
+ $chevron-border-colour: $govuk-secondary-text-colour;
11
+
12
+ .govuk-back-link {
13
+ @include govuk-typography-responsive($size: 16);
14
+ @include govuk-link-common;
15
+ @include govuk-link-style-text;
16
+
17
+ display: inline-block;
18
+ position: relative;
19
+
20
+ margin-top: govuk-spacing(3);
21
+ margin-bottom: govuk-spacing(3);
22
+
23
+ // Allow space for the arrow
24
+ padding-left: 14px;
25
+ }
26
+
27
+ // Prepend left pointing chevron
28
+ .govuk-back-link:before {
29
+ content: "";
30
+ display: block;
31
+
32
+ // Vertically align with the parent element
33
+ position: absolute;
34
+
35
+ @if $govuk-use-legacy-font {
36
+ // Begin adjustments for font baseline offset
37
+ // These should be removed when legacy font support is dropped
38
+ top: -1px;
39
+ bottom: 1px;
40
+ } @else {
41
+ top: 0;
42
+ bottom: 0;
43
+ }
44
+
45
+ left: 3px;
46
+
47
+ width: $chevron-size;
48
+ height: $chevron-size;
49
+
50
+ margin: auto 0;
51
+
52
+ -webkit-transform: rotate(225deg);
53
+
54
+ -ms-transform: rotate(225deg);
55
+
56
+ transform: rotate(225deg);
57
+
58
+ border: solid;
59
+ border-width: $chevron-border-width $chevron-border-width 0 0;
60
+ border-color: $chevron-border-colour;
61
+
62
+ // Fall back to a less than sign for IE8
63
+ @include govuk-if-ie8 {
64
+ content: "\003c"; // Less than sign (<)
65
+ width: auto;
66
+ height: auto;
67
+ border: 0;
68
+ color: $chevron-border-colour;
69
+
70
+ // IE8 doesn't seem to like rendering pseudo-elements using @font-faces,
71
+ // so fall back to using another sans-serif font to render the chevron.
72
+ font-family: Arial, sans-serif;
73
+ }
74
+ }
75
+
76
+ .govuk-back-link:focus:before {
77
+ border-color: $govuk-focus-text-colour;
78
+ }
79
+
80
+ .govuk-back-link:after {
81
+ content: "";
82
+ position: absolute;
83
+ top: -14px;
84
+ right: 0;
85
+ bottom: -14px;
86
+ left: 0;
87
+ }
88
+
89
+ @if $govuk-use-legacy-font {
90
+ // Begin adjustments for font baseline offset
91
+ // These should be removed when legacy font support is dropped
92
+ .govuk-back-link:before {
93
+ $offset: 1px;
94
+
95
+ top: $offset * -1;
96
+ bottom: $offset;
97
+ }
98
+ }
99
+ }
@@ -1,118 +1,2 @@
1
- @import "../../settings/all";
2
- @import "../../tools/all";
3
- @import "../../helpers/all";
4
-
5
- @include govuk-exports("govuk/component/breadcrumbs") {
6
-
7
- // Size of chevron (excluding border)
8
- $chevron-size: 7px;
9
-
10
- // Size of chevron border
11
- $chevron-border-width: 1px;
12
-
13
- // Colour of chevron
14
- $chevron-border-colour: $govuk-secondary-text-colour;
15
-
16
- // Calculated altitude (△↕) of the right-angled isosceles chevron with sides
17
- // of length 8 (7px + 1px border):
18
- //
19
- // √(8² + 8²) * 0.5 ≅ 5.655
20
- $chevron-altitude-calculated: 5.655px;
21
-
22
- .govuk-breadcrumbs {
23
- @include govuk-font($size: 16);
24
- @include govuk-text-colour;
25
-
26
- margin-top: govuk-spacing(3);
27
- margin-bottom: govuk-spacing(2);
28
- }
29
-
30
- .govuk-breadcrumbs__list {
31
- @include govuk-clearfix;
32
-
33
- margin: 0;
34
- padding: 0;
35
- list-style-type: none;
36
- }
37
-
38
- .govuk-breadcrumbs__list-item {
39
-
40
- display: inline-block;
41
- position: relative;
42
-
43
- margin-bottom: govuk-spacing(1);
44
-
45
- // Add both margin and padding such that the chevron appears centrally
46
- // between each breadcrumb item
47
- margin-left: govuk-spacing(2);
48
- padding-left: govuk-spacing(2) + $chevron-altitude-calculated;
49
-
50
- float: left;
51
-
52
- // Create a chevron using a box with borders on two sides, rotated 45deg.
53
- &:before {
54
- content: "";
55
- display: block;
56
-
57
- position: absolute;
58
-
59
- @if $govuk-use-legacy-font {
60
- // Begin adjustments for font baseline offset
61
- // These should be removed when legacy font support is dropped
62
- top: -1px;
63
- bottom: 1px;
64
-
65
- } @else {
66
- top: 0;
67
- bottom: 0;
68
- }
69
-
70
- // Offset by the difference between the width of the non-rotated square
71
- // and its width when rotated
72
- left: (($chevron-altitude-calculated * -2) + $chevron-size + $chevron-border-width);
73
-
74
- width: $chevron-size;
75
- height: $chevron-size;
76
-
77
- margin: auto 0;
78
-
79
- -webkit-transform: rotate(45deg);
80
-
81
- -ms-transform: rotate(45deg);
82
-
83
- transform: rotate(45deg);
84
-
85
- border: solid;
86
- border-width: $chevron-border-width $chevron-border-width 0 0;
87
- border-color: $chevron-border-colour;
88
-
89
- // Fall back to a greater than sign for IE8
90
- @include govuk-if-ie8 {
91
- content: "\003e"; // Greater than sign (>)
92
- width: auto;
93
- height: auto;
94
- border: 0;
95
- color: $chevron-border-colour;
96
-
97
- // IE8 doesn't seem to like rendering pseudo-elements using @font-faces,
98
- // so fall back to using another sans-serif font to render the chevron.
99
- font-family: Arial, sans-serif;
100
- }
101
- }
102
-
103
- &:first-child {
104
- margin-left: 0;
105
- padding-left: 0;
106
-
107
- &:before {
108
- content: none;
109
- display: none;
110
- }
111
- }
112
- }
113
-
114
- .govuk-breadcrumbs__link {
115
- @include govuk-link-common;
116
- @include govuk-link-style-text;
117
- }
118
- }
1
+ @import "../../base";
2
+ @import "./index";
@@ -0,0 +1,138 @@
1
+ @include govuk-exports("govuk/component/breadcrumbs") {
2
+
3
+ // Size of chevron (excluding border)
4
+ $chevron-size: 7px;
5
+
6
+ // Size of chevron border
7
+ $chevron-border-width: 1px;
8
+
9
+ // Colour of chevron
10
+ $chevron-border-colour: $govuk-secondary-text-colour;
11
+
12
+ // Calculated altitude (△↕) of the right-angled isosceles chevron with sides
13
+ // of length 8 (7px + 1px border):
14
+ //
15
+ // √(8² + 8²) * 0.5 ≅ 5.655
16
+ $chevron-altitude-calculated: 5.655px;
17
+
18
+ .govuk-breadcrumbs {
19
+ @include govuk-font($size: 16);
20
+ @include govuk-text-colour;
21
+
22
+ margin-top: govuk-spacing(3);
23
+ margin-bottom: govuk-spacing(2);
24
+ }
25
+
26
+ .govuk-breadcrumbs__list {
27
+ @include govuk-clearfix;
28
+
29
+ margin: 0;
30
+ padding: 0;
31
+ list-style-type: none;
32
+ }
33
+
34
+ .govuk-breadcrumbs__list-item {
35
+
36
+ display: inline-block;
37
+ position: relative;
38
+
39
+ margin-bottom: govuk-spacing(1);
40
+
41
+ // Add both margin and padding such that the chevron appears centrally
42
+ // between each breadcrumb item
43
+ margin-left: govuk-spacing(2);
44
+ padding-left: govuk-spacing(2) + $chevron-altitude-calculated;
45
+
46
+ float: left;
47
+
48
+ // Create a chevron using a box with borders on two sides, rotated 45deg.
49
+ &:before {
50
+ content: "";
51
+ display: block;
52
+
53
+ position: absolute;
54
+
55
+ @if $govuk-use-legacy-font {
56
+ // Begin adjustments for font baseline offset
57
+ // These should be removed when legacy font support is dropped
58
+ top: -1px;
59
+ bottom: 1px;
60
+ } @else {
61
+ top: 0;
62
+ bottom: 0;
63
+ }
64
+
65
+ // Offset by the difference between the width of the non-rotated square
66
+ // and its width when rotated
67
+ left: (($chevron-altitude-calculated * -2) + $chevron-size + $chevron-border-width);
68
+
69
+ width: $chevron-size;
70
+ height: $chevron-size;
71
+
72
+ margin: auto 0;
73
+
74
+ -webkit-transform: rotate(45deg);
75
+
76
+ -ms-transform: rotate(45deg);
77
+
78
+ transform: rotate(45deg);
79
+
80
+ border: solid;
81
+ border-width: $chevron-border-width $chevron-border-width 0 0;
82
+ border-color: $chevron-border-colour;
83
+
84
+ // Fall back to a greater than sign for IE8
85
+ @include govuk-if-ie8 {
86
+ content: "\003e"; // Greater than sign (>)
87
+ width: auto;
88
+ height: auto;
89
+ border: 0;
90
+ color: $chevron-border-colour;
91
+
92
+ // IE8 doesn't seem to like rendering pseudo-elements using @font-faces,
93
+ // so fall back to using another sans-serif font to render the chevron.
94
+ font-family: Arial, sans-serif;
95
+ }
96
+ }
97
+
98
+ &:first-child {
99
+ margin-left: 0;
100
+ padding-left: 0;
101
+
102
+ &:before {
103
+ content: none;
104
+ display: none;
105
+ }
106
+ }
107
+ }
108
+
109
+ .govuk-breadcrumbs__link {
110
+ @include govuk-link-common;
111
+ @include govuk-link-style-text;
112
+ }
113
+
114
+ .govuk-breadcrumbs--collapse-on-mobile {
115
+ @include govuk-media-query($until: tablet) {
116
+ .govuk-breadcrumbs__list-item {
117
+ display: none;
118
+
119
+ &:first-child,
120
+ &:last-child {
121
+ display: inline-block;
122
+ }
123
+
124
+ &:before {
125
+ top: 6px;
126
+ margin: 0;
127
+ }
128
+ }
129
+
130
+ .govuk-breadcrumbs__list {
131
+ display: -webkit-box;
132
+ display: -webkit-flex;
133
+ display: -ms-flexbox;
134
+ display: flex;
135
+ }
136
+ }
137
+ }
138
+ }
@@ -1,284 +1,2 @@
1
- @import "../../settings/all";
2
- @import "../../tools/all";
3
- @import "../../helpers/all";
4
-
5
- @include govuk-exports("govuk/component/button") {
6
- $govuk-button-colour: govuk-colour("green", $legacy: #00823b); // sass-lint:disable no-color-literals
7
- $govuk-button-hover-colour: govuk-shade($govuk-button-colour, 20%);
8
- $govuk-button-shadow-colour: govuk-shade($govuk-button-colour, 60%);
9
- $govuk-button-text-colour: govuk-colour("white");
10
-
11
- // Secondary button variables
12
- $govuk-secondary-button-colour: govuk-colour("light-grey", $legacy: "grey-3");
13
- $govuk-secondary-button-hover-colour: govuk-shade($govuk-secondary-button-colour, 10%);
14
- $govuk-secondary-button-shadow-colour: govuk-shade($govuk-secondary-button-colour, 40%);
15
- $govuk-secondary-button-text-colour: govuk-colour("black");
16
-
17
- // Warning button variables
18
- $govuk-warning-button-colour: govuk-colour("red");
19
- $govuk-warning-button-hover-colour: govuk-shade($govuk-warning-button-colour, 20%);
20
- $govuk-warning-button-shadow-colour: govuk-shade($govuk-warning-button-colour, 60%);
21
- $govuk-warning-button-text-colour: govuk-colour("white");
22
-
23
- // Because the shadow (s0) is visually 'part of' the button, we need to reduce
24
- // the height of the button to compensate by adjusting its padding (s1) and
25
- // increase the bottom margin to include it (s2).
26
- $button-shadow-size: $govuk-border-width-form-element;
27
-
28
- .govuk-button {
29
- @include govuk-font($size: 19, $line-height: 19px);
30
-
31
- box-sizing: border-box;
32
- display: inline-block;
33
- position: relative;
34
- width: 100%;
35
- margin-top: 0;
36
- @include govuk-responsive-margin(6, "bottom", $adjustment: $button-shadow-size); // s2
37
- padding: (govuk-spacing(2) - $govuk-border-width-form-element) govuk-spacing(2) (govuk-spacing(2) - $govuk-border-width-form-element - ($button-shadow-size / 2)); // s1
38
- border: $govuk-border-width-form-element solid transparent;
39
- border-radius: 0;
40
- color: $govuk-button-text-colour;
41
- background-color: $govuk-button-colour;
42
- box-shadow: 0 $button-shadow-size 0 $govuk-button-shadow-colour; // s0
43
- text-align: center;
44
- vertical-align: top;
45
- cursor: pointer;
46
- -webkit-appearance: none;
47
-
48
- @include govuk-if-ie8 {
49
- border-bottom: $button-shadow-size solid $govuk-button-shadow-colour;
50
- }
51
-
52
- @include govuk-media-query($from: tablet) {
53
- width: auto;
54
- }
55
-
56
- // Ensure that any global link styles are overridden
57
- &:link,
58
- &:visited,
59
- &:active,
60
- &:hover {
61
- color: $govuk-button-text-colour;
62
- text-decoration: none;
63
- }
64
-
65
- // Fix unwanted button padding in Firefox
66
- &::-moz-focus-inner {
67
- padding: 0;
68
- border: 0;
69
- }
70
-
71
- &:hover {
72
- background-color: $govuk-button-hover-colour;
73
- }
74
-
75
- &:active {
76
- // Bump the button down so it looks like its being pressed in
77
- top: $button-shadow-size;
78
-
79
- @include govuk-if-ie8 {
80
- border-bottom-width: 0;
81
- }
82
- }
83
-
84
- &:focus {
85
- border-color: $govuk-focus-colour;
86
- // When colours are overridden, for example when users have a dark mode,
87
- // backgrounds and box-shadows disappear, so we need to ensure there's a
88
- // transparent outline which will be set to a visible colour.
89
- // Since Internet Explorer 8 does not support box-shadow, we want to force the user-agent outlines
90
- @include govuk-not-ie8 {
91
- outline: $govuk-focus-width solid transparent;
92
- }
93
- // Since Internet Explorer does not support `:not()` we set a clearer focus style to match user-agent outlines.
94
- @include govuk-if-ie8 {
95
- color: $govuk-focus-text-colour;
96
- background-color: $govuk-focus-colour;
97
- }
98
- box-shadow: inset 0 0 0 1px $govuk-focus-colour;
99
- }
100
-
101
- // alphagov/govuk_template includes a specific a:link:focus selector
102
- // designed to make unvisited links a slightly darker blue when focussed, so
103
- // we need to override the text colour for that combination of selectors so
104
- // so that unvisited links styled as buttons do not end up with dark blue
105
- // text when focussed.
106
- @include govuk-compatibility(govuk_template) {
107
- &:link:focus {
108
- color: $govuk-button-text-colour;
109
- }
110
- }
111
-
112
- &:focus:not(:active):not(:hover) {
113
- border-color: $govuk-focus-colour;
114
- color: $govuk-focus-text-colour;
115
- background-color: $govuk-focus-colour;
116
- box-shadow: 0 2px 0 $govuk-focus-text-colour;
117
- }
118
-
119
- // The following adjustments do not work for <input type="button"> as
120
- // non-container elements cannot include pseudo elements (i.e. ::before).
121
-
122
- // Use a pseudo element to expand the click target area to include the
123
- // button's shadow as well, in case users try to click it.
124
- &::before {
125
- content: "";
126
- display: block;
127
-
128
- position: absolute;
129
-
130
- top: -$govuk-border-width-form-element;
131
- right: -$govuk-border-width-form-element;
132
- bottom: -($govuk-border-width-form-element + $button-shadow-size);
133
- left: -$govuk-border-width-form-element;
134
-
135
- background: transparent;
136
- }
137
-
138
- // When the button is active it is shifted down by $button-shadow-size to
139
- // denote a 'pressed' state. If the user happened to click at the very top
140
- // of the button, their mouse is no longer over the button (because it has
141
- // 'moved beneath them') and so the click event is not fired.
142
- //
143
- // This corrects that by shifting the top of the pseudo element so that it
144
- // continues to cover the area that the user originally clicked, which means
145
- // the click event is still fired.
146
- //
147
- // 🎉
148
- &:active::before {
149
- top: -($govuk-border-width-form-element + $button-shadow-size);
150
- }
151
- }
152
-
153
- .govuk-button--disabled,
154
- .govuk-button[disabled="disabled"],
155
- .govuk-button[disabled] {
156
- opacity: (.5);
157
-
158
- &:hover {
159
- background-color: $govuk-button-colour;
160
- cursor: default;
161
- }
162
-
163
- &:focus {
164
- outline: none;
165
- }
166
-
167
- &:active {
168
- top: 0;
169
- box-shadow: 0 $button-shadow-size 0 $govuk-button-shadow-colour; // s0
170
- @include govuk-if-ie8 {
171
- border-bottom: $button-shadow-size solid $govuk-button-shadow-colour; // s0
172
- }
173
- }
174
- }
175
-
176
- .govuk-button--secondary {
177
- background-color: $govuk-secondary-button-colour;
178
- box-shadow: 0 $button-shadow-size 0 $govuk-secondary-button-shadow-colour;
179
-
180
- &,
181
- &:link,
182
- &:visited,
183
- &:active,
184
- &:hover {
185
- color: $govuk-secondary-button-text-colour;
186
- }
187
-
188
- // alphagov/govuk_template includes a specific a:link:focus selector
189
- // designed to make unvisited links a slightly darker blue when focussed, so
190
- // we need to override the text colour for that combination of selectors so
191
- // so that unvisited links styled as buttons do not end up with dark blue
192
- // text when focussed.
193
- @include govuk-compatibility(govuk_template) {
194
- &:link:focus {
195
- color: $govuk-secondary-button-text-colour;
196
- }
197
- }
198
-
199
- &:hover {
200
- background-color: $govuk-secondary-button-hover-colour;
201
-
202
- &[disabled] {
203
- background-color: $govuk-secondary-button-colour;
204
- }
205
- }
206
- }
207
-
208
- .govuk-button--warning {
209
- background-color: $govuk-warning-button-colour;
210
- box-shadow: 0 $button-shadow-size 0 $govuk-warning-button-shadow-colour;
211
-
212
- &,
213
- &:link,
214
- &:visited,
215
- &:active,
216
- &:hover {
217
- color: $govuk-warning-button-text-colour;
218
- }
219
-
220
- // alphagov/govuk_template includes a specific a:link:focus selector
221
- // designed to make unvisited links a slightly darker blue when focussed, so
222
- // we need to override the text colour for that combination of selectors so
223
- // so that unvisited links styled as buttons do not end up with dark blue
224
- // text when focussed.
225
- @include govuk-compatibility(govuk_template) {
226
- &:link:focus {
227
- color: $govuk-warning-button-text-colour;
228
- }
229
- }
230
-
231
- &:hover {
232
- background-color: $govuk-warning-button-hover-colour;
233
-
234
- &[disabled] {
235
- background-color: $govuk-warning-button-colour;
236
- }
237
- }
238
- }
239
-
240
- .govuk-button--start {
241
- @include govuk-typography-weight-bold;
242
- @include govuk-typography-responsive($size: 24, $override-line-height: 1);
243
-
244
- display: -webkit-inline-box;
245
-
246
- display: -ms-inline-flexbox;
247
-
248
- display: inline-flex;
249
- min-height: auto;
250
-
251
- -webkit-box-pack: center;
252
-
253
- -ms-flex-pack: center;
254
-
255
- justify-content: center;
256
- }
257
-
258
- .govuk-button__start-icon {
259
- margin-left: govuk-spacing(1);
260
-
261
- @include govuk-media-query($from: desktop) {
262
- margin-left: govuk-spacing(2);
263
- }
264
- vertical-align: middle;
265
- -ms-flex-negative: 0;
266
- flex-shrink: 0;
267
- -ms-flex-item-align: center;
268
- align-self: center;
269
- }
270
-
271
- @if $govuk-use-legacy-font {
272
- // Begin adjustments for font baseline offset when using v1 of nta
273
- $offset: 2;
274
-
275
- .govuk-button {
276
- padding-top: (govuk-spacing(2) - $govuk-border-width-form-element - ($button-shadow-size / 2) + $offset); // s1
277
- padding-bottom: (govuk-spacing(2) - $govuk-border-width-form-element - ($button-shadow-size / 2) - $offset + 1); // s1
278
- }
279
-
280
- .govuk-button__start-icon {
281
- margin-top: -3px;
282
- }
283
- }
284
- }
1
+ @import "../../base";
2
+ @import "./index";