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
@@ -1,9 +1,7 @@
1
1
  ////
2
- /// @group helpers
2
+ /// @group helpers/layout
3
3
  ////
4
4
 
5
-
6
-
7
5
  // =========================================================
8
6
  // Wrangle sass-mq config...
9
7
  // =========================================================
@@ -41,8 +39,6 @@ $sass-mq-already-included: false !default;
41
39
 
42
40
  $sass-mq-already-included: true;
43
41
 
44
-
45
-
46
42
  // =========================================================
47
43
  // Helpers
48
44
  // =========================================================
@@ -91,5 +87,5 @@ $sass-mq-already-included: true;
91
87
  @mixin govuk-media-query($args...) {
92
88
  @include mq($args...) {
93
89
  @content;
94
- };
90
+ }
95
91
  }
@@ -1,5 +1,5 @@
1
1
  ////
2
- /// @group helpers
2
+ /// @group helpers/shapes
3
3
  ////
4
4
 
5
5
  /// Calculate the height of an equilateral triangle
@@ -1,7 +1,9 @@
1
1
  ////
2
- /// @group helpers
2
+ /// @group helpers/spacing
3
3
  ////
4
4
 
5
+ // stylelint-disable indentation
6
+
5
7
  /// Single point spacing
6
8
  ///
7
9
  /// Returns measurement corresponding to the spacing point requested.
@@ -146,7 +148,6 @@
146
148
  ///
147
149
  /// @access public
148
150
 
149
-
150
151
  @mixin govuk-responsive-padding($responsive-spacing-point, $direction: "all", $important: false, $adjustment: false) {
151
152
  @include _govuk-responsive-spacing($responsive-spacing-point, "padding", $direction, $important, $adjustment);
152
153
  }
@@ -1,5 +1,5 @@
1
1
  ////
2
- /// @group helpers
2
+ /// @group helpers/typography
3
3
  ////
4
4
 
5
5
  @import "../tools/px-to-rem";
@@ -127,7 +127,8 @@
127
127
  $font-size-rem: govuk-px-to-rem($font-size);
128
128
 
129
129
  $line-height: _govuk-line-height(
130
- $line-height: if($override-line-height,
130
+ $line-height: if(
131
+ $override-line-height,
131
132
  $override-line-height,
132
133
  map-get($breakpoint-map, "line-height")
133
134
  ),
@@ -142,9 +143,9 @@
142
143
  $line-height: $line-height if($important, !important, null);
143
144
 
144
145
  @if $breakpoint == null {
145
- font-size: $font-size; // sass-lint:disable no-duplicate-properties
146
+ font-size: $font-size;
146
147
  @if $govuk-typography-use-rem {
147
- font-size: $font-size-rem; // sass-lint:disable no-duplicate-properties
148
+ font-size: $font-size-rem;
148
149
  }
149
150
  line-height: $line-height;
150
151
  } @else if $breakpoint == "print" {
@@ -154,9 +155,9 @@
154
155
  }
155
156
  } @else {
156
157
  @include govuk-media-query($from: $breakpoint) {
157
- font-size: $font-size; // sass-lint:disable no-duplicate-properties
158
+ font-size: $font-size;
158
159
  @if $govuk-typography-use-rem {
159
- font-size: $font-size-rem; // sass-lint:disable no-duplicate-properties
160
+ font-size: $font-size-rem;
160
161
  }
161
162
  line-height: $line-height;
162
163
  }
@@ -184,7 +185,7 @@
184
185
  -webkit-font-feature-settings: "tnum" 1;
185
186
  font-feature-settings: "tnum" 1;
186
187
 
187
- @supports(font-variant-numeric: tabular-nums) {
188
+ @supports (font-variant-numeric: tabular-nums) {
188
189
  -webkit-font-feature-settings: normal;
189
190
  font-feature-settings: normal;
190
191
  font-variant-numeric: tabular-nums;
@@ -1,5 +1,5 @@
1
1
  ////
2
- /// @group helpers
2
+ /// @group helpers/accessibility
3
3
  ////
4
4
 
5
5
  /// Hide an element visually, but have it available for screen readers
@@ -1,3 +1,4 @@
1
+ @import "button-group";
1
2
  @import "form-group";
2
3
  @import "grid";
3
4
  @import "main-wrapper";
@@ -0,0 +1,101 @@
1
+ @import "../base";
2
+
3
+ @include govuk-exports("govuk/objects/button-group") {
4
+ // Button groups can be used to group buttons and links together as a group.
5
+ //
6
+ // Within a button group:
7
+ //
8
+ // - links are styled to line up visually with the buttons, including being
9
+ // centre-aligned on mobile
10
+ // - spacing between the buttons and links is handled automatically, including
11
+ // when they wrap across multiple lines
12
+ .govuk-button-group {
13
+ $horizontal-gap: govuk-spacing(3);
14
+ $vertical-gap: govuk-spacing(3);
15
+
16
+ // These need to be kept in sync with the button component's styles
17
+ $button-padding: govuk-spacing(2);
18
+ $button-shadow-size: $govuk-border-width-form-element;
19
+
20
+ $link-spacing: govuk-spacing(1);
21
+
22
+ @include govuk-responsive-margin(6, "bottom", $adjustment: $vertical-gap * -1);
23
+
24
+ // Flexbox is used to center-align links on mobile, align everything along
25
+ // the baseline on tablet and above, and to removes extra whitespace that
26
+ // we'd get between the buttons and links because they're inline-blocks.
27
+ //
28
+ // Ideally we'd use `gap` with flexbox rather than having to do it all with
29
+ // margins, but unfortunately the support isn't there (yet) and @supports
30
+ // doesn't play nicely with it
31
+ // (https://github.com/w3c/csswg-drafts/issues/3559)
32
+ display: -webkit-box;
33
+ display: -webkit-flex;
34
+ display: -ms-flexbox;
35
+ display: flex;
36
+ -webkit-box-orient: vertical;
37
+ -webkit-box-direction: normal;
38
+ -webkit-flex-direction: column;
39
+ -ms-flex-direction: column;
40
+ flex-direction: column;
41
+ -webkit-box-align: center;
42
+ -webkit-align-items: center;
43
+ -ms-flex-align: center;
44
+ align-items: center;
45
+
46
+ // Give links within the button group the same font-size and line-height
47
+ // as buttons.
48
+ //
49
+ // Because we want the focus state to be tight around the link text, we use
50
+ // margins where the buttons would use padding.
51
+ .govuk-link {
52
+ @include govuk-font($size: 19, $line-height: 19px);
53
+ display: inline-block;
54
+ // Prevent links overflowing their container in IE10/11 because of bug
55
+ // with align-items: center
56
+ max-width: 100%;
57
+ margin-top: $link-spacing;
58
+ margin-bottom: $link-spacing + $vertical-gap;
59
+ text-align: center;
60
+ }
61
+
62
+ // Reduce the bottom margin to the size of the vertical gap (accommodating
63
+ // the button shadow) – the 'lost' margin is moved to the button-group.
64
+ .govuk-button {
65
+ margin-bottom: $vertical-gap + $button-shadow-size;
66
+ }
67
+
68
+ // On tablet and above, we also introduce a 'column gap' between the
69
+ // buttons and links in each row and left align links
70
+ @include govuk-media-query($from: tablet) {
71
+ // Cancel out the column gap for the last item in each row
72
+ margin-right: ($horizontal-gap * -1);
73
+
74
+ -webkit-box-orient: horizontal;
75
+
76
+ -webkit-box-direction: normal;
77
+
78
+ -webkit-flex-direction: row;
79
+
80
+ -ms-flex-direction: row;
81
+
82
+ flex-direction: row;
83
+ -webkit-flex-wrap: wrap;
84
+ -ms-flex-wrap: wrap;
85
+ flex-wrap: wrap;
86
+ -webkit-box-align: baseline;
87
+ -webkit-align-items: baseline;
88
+ -ms-flex-align: baseline;
89
+ align-items: baseline;
90
+
91
+ .govuk-button,
92
+ .govuk-link {
93
+ margin-right: $horizontal-gap;
94
+ }
95
+
96
+ .govuk-link {
97
+ text-align: left;
98
+ }
99
+ }
100
+ }
101
+ }
@@ -1,9 +1,6 @@
1
- @import "../settings/all";
2
- @import "../tools/all";
3
- @import "../helpers/all";
1
+ @import "../base";
4
2
 
5
3
  @include govuk-exports("govuk/objects/form-group") {
6
-
7
4
  .govuk-form-group {
8
5
  @include govuk-clearfix;
9
6
  @include govuk-responsive-margin(6, "bottom");
@@ -1,9 +1,6 @@
1
- @import "../settings/all";
2
- @import "../tools/all";
3
- @import "../helpers/all";
1
+ @import "../base";
4
2
 
5
3
  @include govuk-exports("govuk/objects/grid") {
6
-
7
4
  .govuk-grid-row {
8
5
  @include govuk-clearfix;
9
6
  margin-right: - ($govuk-gutter-half);
@@ -12,7 +9,7 @@
12
9
 
13
10
  @each $width in map-keys($govuk-grid-widths) {
14
11
  .govuk-grid-column-#{$width} {
15
- @include govuk-grid-column($width)
12
+ @include govuk-grid-column($width);
16
13
  }
17
14
  }
18
15
 
@@ -21,7 +18,7 @@
21
18
  // them in the outputted CSS
22
19
  @each $width in map-keys($govuk-grid-widths) {
23
20
  .govuk-grid-column-#{$width}-from-desktop {
24
- @include govuk-grid-column($width, $at: desktop)
21
+ @include govuk-grid-column($width, $at: desktop);
25
22
  }
26
23
  }
27
24
  }
@@ -1,6 +1,8 @@
1
- @import "../settings/all";
2
- @import "../tools/all";
3
- @import "../helpers/all";
1
+ @import "../base";
2
+
3
+ ////
4
+ /// @group objects/layout
5
+ ////
4
6
 
5
7
  // Example usage with Breadcrumbs, phase banners, back links:
6
8
  // <div class="govuk-width-container">
@@ -19,7 +21,6 @@
19
21
  // </div>
20
22
  // </div>
21
23
 
22
-
23
24
  /// @deprecated Replace this mixin with more direct references to the [spacing
24
25
  /// mixins](https://design-system.service.gov.uk/styles/spacing/#spacing-on-custom-components).
25
26
  @mixin govuk-main-wrapper {
@@ -1,9 +1,7 @@
1
- @import "../settings/all";
2
- @import "../tools/all";
3
- @import "../helpers/all";
1
+ @import "../base";
4
2
 
5
3
  ////
6
- /// @group objects
4
+ /// @group objects/layout
7
5
  ////
8
6
 
9
7
  /// Width container mixin
@@ -30,7 +28,9 @@
30
28
 
31
29
  // Respect 'display cutout' safe area (avoids notches and rounded corners)
32
30
  @supports (margin: unquote("max(calc(0px))")) {
31
+ $gutter-safe-area-right: -webkit-calc(#{$govuk-gutter-half} + env(safe-area-inset-right));
33
32
  $gutter-safe-area-right: calc(#{$govuk-gutter-half} + env(safe-area-inset-right));
33
+ $gutter-safe-area-left: -webkit-calc(#{$govuk-gutter-half} + env(safe-area-inset-left));
34
34
  $gutter-safe-area-left: calc(#{$govuk-gutter-half} + env(safe-area-inset-left));
35
35
 
36
36
  // Use max() to pick largest margin, default or with safe area
@@ -46,7 +46,9 @@
46
46
 
47
47
  // Respect 'display cutout' safe area (avoids notches and rounded corners)
48
48
  @supports (margin: unquote("max(calc(0px))")) {
49
+ $gutter-safe-area-right: -webkit-calc(#{$govuk-gutter-half} + env(safe-area-inset-right));
49
50
  $gutter-safe-area-right: calc(#{$govuk-gutter-half} + env(safe-area-inset-right));
51
+ $gutter-safe-area-left: -webkit-calc(#{$govuk-gutter-half} + env(safe-area-inset-left));
50
52
  $gutter-safe-area-left: calc(#{$govuk-gutter-half} + env(safe-area-inset-left));
51
53
 
52
54
  // Use max() to pick largest margin, default or with safe area
@@ -1,9 +1,11 @@
1
- @import "../settings/all";
2
- @import "../tools/all";
3
- @import "../helpers/all";
1
+ @if not mixin-exists("govuk-exports") {
2
+ @warn "Importing items from the overrides layer without first importing `base` is deprecated, and will no longer work as of GOV.UK Frontend v4.0.";
3
+ }
4
4
 
5
- @include govuk-exports("govuk/overrides/display") {
5
+ @import "../base";
6
6
 
7
+ // stylelint-disable declaration-no-important
8
+ @include govuk-exports("govuk/overrides/display") {
7
9
  .govuk-\!-display-inline {
8
10
  display: inline !important;
9
11
  }
@@ -1,6 +1,8 @@
1
- @import "../settings/all";
2
- @import "../tools/all";
3
- @import "../helpers/all";
1
+ @if not mixin-exists("govuk-exports") {
2
+ @warn "Importing items from the overrides layer without first importing `base` is deprecated, and will no longer work as of GOV.UK Frontend v4.0.";
3
+ }
4
+
5
+ @import "../base";
4
6
 
5
7
  ////
6
8
  /// @group overrides
@@ -1,6 +1,8 @@
1
- @import "../settings/all";
2
- @import "../tools/all";
3
- @import "../helpers/all";
1
+ @if not mixin-exists("govuk-exports") {
2
+ @warn "Importing items from the overrides layer without first importing `base` is deprecated, and will no longer work as of GOV.UK Frontend v4.0.";
3
+ }
4
+
5
+ @import "../base";
4
6
 
5
7
  @include govuk-exports("govuk/overrides/typography") {
6
8
  // Font size and line height
@@ -1,7 +1,10 @@
1
- @import "../settings/all";
2
- @import "../tools/all";
3
- @import "../helpers/all";
1
+ @if not mixin-exists("govuk-exports") {
2
+ @warn "Importing items from the overrides layer without first importing `base` is deprecated, and will no longer work as of GOV.UK Frontend v4.0.";
3
+ }
4
+
5
+ @import "../base";
4
6
 
7
+ // stylelint-disable declaration-no-important
5
8
  @include govuk-exports("govuk/overrides/width") {
6
9
  .govuk-\!-width-full {
7
10
  width: 100% !important;
@@ -19,3 +19,5 @@
19
19
  @import "typography-font-families";
20
20
  @import "typography-font";
21
21
  @import "typography-responsive";
22
+
23
+ @import "links";
@@ -4,8 +4,6 @@
4
4
 
5
5
  @import "../helpers/colour";
6
6
 
7
-
8
-
9
7
  // =========================================================
10
8
  // Generic
11
9
  // =========================================================
@@ -52,7 +50,7 @@ $govuk-print-text-colour: #000000 !default;
52
50
 
53
51
  /// Secondary text colour
54
52
  ///
55
- /// Used for 'muted' text, help text, etc.
53
+ /// Used in for example 'muted' text and help text.
56
54
  ///
57
55
  /// @type Colour
58
56
  /// @access public
@@ -88,9 +86,18 @@ $govuk-focus-text-colour: govuk-colour("black") !default;
88
86
 
89
87
  $govuk-error-colour: govuk-colour("red") !default;
90
88
 
89
+ /// Success colour
90
+ ///
91
+ /// Used to highlight success messages and banners
92
+ ///
93
+ /// @type Colour
94
+ /// @access public
95
+
96
+ $govuk-success-colour: govuk-colour("green") !default;
97
+
91
98
  /// Border colour
92
99
  ///
93
- /// Used for borders, separators, rules, keylines etc.
100
+ /// Used in for example borders, separators, rules and keylines.
94
101
  ///
95
102
  /// @type Colour
96
103
  /// @access public
@@ -115,7 +122,6 @@ $govuk-input-border-colour: govuk-colour("black") !default;
115
122
 
116
123
  $govuk-hover-colour: govuk-colour("mid-grey", $legacy: "grey-3");
117
124
 
118
-
119
125
  // =============================================================================
120
126
  // Links
121
127
  // =============================================================================
@@ -70,6 +70,9 @@ $govuk-colours-organisations: (
70
70
  colour: #00ad93,
71
71
  colour-websafe: #39836e
72
72
  ),
73
+ "foreign-commonwealth-development-office": (
74
+ colour: #012169
75
+ ),
73
76
  "foreign-commonwealth-office": (
74
77
  colour: #003e74,
75
78
  colour-websafe: #406e97
@@ -1,5 +1,8 @@
1
1
  @import "compatibility";
2
2
 
3
+ // stylelint-disable value-list-max-empty-lines -- allow empty lines in lists
4
+ // in this file to allow grouping
5
+
3
6
  ////
4
7
  /// @group settings/colours
5
8
  ////
@@ -13,11 +16,48 @@
13
16
  /// @type Boolean
14
17
  /// @access public
15
18
 
16
- $govuk-use-legacy-palette: if((
19
+ $govuk-use-legacy-palette: if(
20
+ (
17
21
  $govuk-compatibility-govukfrontendtoolkit or
18
22
  $govuk-compatibility-govuktemplate or
19
23
  $govuk-compatibility-govukelements
20
- ), true, false) !default;
24
+ ),
25
+ true,
26
+ false
27
+ ) !default;
28
+
29
+ /// Modern colour palette
30
+ ///
31
+ /// This exists only because you cannot easily set a !default variable
32
+ /// conditionally (thanks to the way scope works in Sass) so we set
33
+ /// `$govuk-colour-palette` using the `if` function.
34
+ ///
35
+ /// @access private
36
+
37
+ $_govuk-colour-palette-modern: (
38
+ "red": #d4351c,
39
+ "yellow": #ffdd00,
40
+ "green": #00703c,
41
+ "blue": #1d70b8,
42
+ "dark-blue": #003078,
43
+ "light-blue": #5694ca,
44
+ "purple": #4c2c92,
45
+
46
+ "black": #0b0c0c,
47
+ "dark-grey": #505a5f,
48
+ "mid-grey": #b1b4b6,
49
+ "light-grey": #f3f2f1,
50
+ "white": #ffffff,
51
+
52
+ "light-purple": #6f72af,
53
+ "bright-purple": #912b88,
54
+ "pink": #d53880,
55
+ "light-pink": #f499be,
56
+ "orange": #f47738,
57
+ "brown": #b58840,
58
+ "light-green": #85994b,
59
+ "turquoise": #28a197
60
+ );
21
61
 
22
62
  /// Legacy colour palette
23
63
  ///
@@ -52,39 +92,6 @@ $_govuk-colour-palette-legacy: (
52
92
  "white": #ffffff
53
93
  );
54
94
 
55
- /// Modern colour palette
56
- ///
57
- /// This exists only because you cannot easily set a !default variable
58
- /// conditionally (thanks to the way scope works in Sass) so we set
59
- /// `$govuk-colour-palette` using the `if` function.
60
- ///
61
- /// @access private
62
-
63
- $_govuk-colour-palette-modern: (
64
- "red": #d4351c,
65
- "yellow": #ffdd00,
66
- "green": #00703c,
67
- "blue": #1d70b8,
68
- "dark-blue": #003078,
69
- "light-blue": #5694ca,
70
- "purple": #4c2c92,
71
-
72
- "black": #0b0c0c,
73
- "dark-grey": #626a6e,
74
- "mid-grey": #b1b4b6,
75
- "light-grey": #f3f2f1,
76
- "white": #ffffff,
77
-
78
- "light-purple": #6f72af,
79
- "bright-purple": #912b88,
80
- "pink": #d53880,
81
- "light-pink": #f499be,
82
- "orange": #f47738,
83
- "brown": #b58840,
84
- "light-green": #85994b,
85
- "turquoise": #28a197
86
- );
87
-
88
95
  /// Colour palette
89
96
  ///
90
97
  /// @type Map