dxw_govuk_frontend_rails 3.5.0 → 3.10.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (116) hide show
  1. checksums.yaml +4 -4
  2. data/CONTRIBUTING.md +1 -0
  3. data/Gemfile.lock +3 -2
  4. data/README.md +45 -42
  5. data/lib/dxw_govuk_frontend_rails/version.rb +1 -1
  6. data/package-lock.json +3 -3
  7. data/package.json +1 -1
  8. data/vendor/assets/javascripts/govuk_frontend_rails.js +265 -121
  9. data/vendor/assets/stylesheets/_base.scss +3 -0
  10. data/vendor/assets/stylesheets/all.scss +1 -3
  11. data/vendor/assets/stylesheets/components/_all.scss +32 -29
  12. data/vendor/assets/stylesheets/components/accordion/_accordion.scss +2 -208
  13. data/vendor/assets/stylesheets/components/accordion/_index.scss +206 -0
  14. data/vendor/assets/stylesheets/components/back-link/_back-link.scss +2 -65
  15. data/vendor/assets/stylesheets/components/back-link/_index.scss +110 -0
  16. data/vendor/assets/stylesheets/components/breadcrumbs/_breadcrumbs.scss +2 -118
  17. data/vendor/assets/stylesheets/components/breadcrumbs/_index.scss +137 -0
  18. data/vendor/assets/stylesheets/components/button/_button.scss +2 -284
  19. data/vendor/assets/stylesheets/components/button/_index.scss +280 -0
  20. data/vendor/assets/stylesheets/components/character-count/_character-count.scss +2 -31
  21. data/vendor/assets/stylesheets/components/character-count/_index.scss +24 -0
  22. data/vendor/assets/stylesheets/components/checkboxes/_checkboxes.scss +2 -308
  23. data/vendor/assets/stylesheets/components/checkboxes/_index.scss +305 -0
  24. data/vendor/assets/stylesheets/components/date-input/_date-input.scss +2 -30
  25. data/vendor/assets/stylesheets/components/date-input/_index.scss +26 -0
  26. data/vendor/assets/stylesheets/components/details/_details.scss +2 -88
  27. data/vendor/assets/stylesheets/components/details/_index.scss +83 -0
  28. data/vendor/assets/stylesheets/components/error-message/_error-message.scss +2 -15
  29. data/vendor/assets/stylesheets/components/error-message/_index.scss +11 -0
  30. data/vendor/assets/stylesheets/components/error-summary/_error-summary.scss +2 -59
  31. data/vendor/assets/stylesheets/components/error-summary/_index.scss +43 -0
  32. data/vendor/assets/stylesheets/components/fieldset/_fieldset.scss +2 -68
  33. data/vendor/assets/stylesheets/components/fieldset/_index.scss +64 -0
  34. data/vendor/assets/stylesheets/components/file-upload/_file-upload.scss +2 -81
  35. data/vendor/assets/stylesheets/components/file-upload/_index.scss +50 -0
  36. data/vendor/assets/stylesheets/components/footer/_footer.scss +2 -244
  37. data/vendor/assets/stylesheets/components/footer/_index.scss +234 -0
  38. data/vendor/assets/stylesheets/components/header/_header.scss +2 -318
  39. data/vendor/assets/stylesheets/components/header/_index.scss +309 -0
  40. data/vendor/assets/stylesheets/components/hint/_hint.scss +2 -50
  41. data/vendor/assets/stylesheets/components/hint/_index.scss +44 -0
  42. data/vendor/assets/stylesheets/components/input/_index.scss +187 -0
  43. data/vendor/assets/stylesheets/components/input/_input.scss +2 -103
  44. data/vendor/assets/stylesheets/components/inset-text/_index.scss +24 -0
  45. data/vendor/assets/stylesheets/components/inset-text/_inset-text.scss +2 -28
  46. data/vendor/assets/stylesheets/components/label/_index.scss +41 -0
  47. data/vendor/assets/stylesheets/components/label/_label.scss +2 -45
  48. data/vendor/assets/stylesheets/components/notification-banner/_index.scss +89 -0
  49. data/vendor/assets/stylesheets/components/notification-banner/_notification-banner.scss +2 -0
  50. data/vendor/assets/stylesheets/components/panel/_index.scss +44 -0
  51. data/vendor/assets/stylesheets/components/panel/_panel.scss +2 -44
  52. data/vendor/assets/stylesheets/components/phase-banner/_index.scss +27 -0
  53. data/vendor/assets/stylesheets/components/phase-banner/_phase-banner.scss +2 -31
  54. data/vendor/assets/stylesheets/components/radios/_index.scss +342 -0
  55. data/vendor/assets/stylesheets/components/radios/_radios.scss +2 -346
  56. data/vendor/assets/stylesheets/components/select/_index.scss +49 -0
  57. data/vendor/assets/stylesheets/components/select/_select.scss +2 -57
  58. data/vendor/assets/stylesheets/components/skip-link/_index.scss +34 -0
  59. data/vendor/assets/stylesheets/components/skip-link/_skip-link.scss +2 -37
  60. data/vendor/assets/stylesheets/components/summary-list/_index.scss +145 -0
  61. data/vendor/assets/stylesheets/components/summary-list/_summary-list.scss +2 -157
  62. data/vendor/assets/stylesheets/components/table/_index.scss +50 -0
  63. data/vendor/assets/stylesheets/components/table/_table.scss +2 -54
  64. data/vendor/assets/stylesheets/components/tabs/_index.scss +135 -0
  65. data/vendor/assets/stylesheets/components/tabs/_tabs.scss +2 -142
  66. data/vendor/assets/stylesheets/components/tag/_index.scss +86 -0
  67. data/vendor/assets/stylesheets/components/tag/_tag.scss +2 -44
  68. data/vendor/assets/stylesheets/components/textarea/_index.scss +47 -0
  69. data/vendor/assets/stylesheets/components/textarea/_textarea.scss +2 -55
  70. data/vendor/assets/stylesheets/components/warning-text/_index.scss +57 -0
  71. data/vendor/assets/stylesheets/components/warning-text/_warning-text.scss +2 -60
  72. data/vendor/assets/stylesheets/core/_global-styles.scss +5 -3
  73. data/vendor/assets/stylesheets/core/_links.scss +5 -3
  74. data/vendor/assets/stylesheets/core/_lists.scss +17 -3
  75. data/vendor/assets/stylesheets/core/_section-break.scss +5 -3
  76. data/vendor/assets/stylesheets/core/_template.scss +5 -3
  77. data/vendor/assets/stylesheets/core/_typography.scss +5 -3
  78. data/vendor/assets/stylesheets/helpers/_clearfix.scss +1 -1
  79. data/vendor/assets/stylesheets/helpers/_colour.scss +1 -1
  80. data/vendor/assets/stylesheets/helpers/_device-pixels.scss +3 -3
  81. data/vendor/assets/stylesheets/helpers/_focused.scss +1 -1
  82. data/vendor/assets/stylesheets/helpers/_font-faces.scss +9 -11
  83. data/vendor/assets/stylesheets/helpers/_grid.scss +2 -1
  84. data/vendor/assets/stylesheets/helpers/_links.scss +96 -4
  85. data/vendor/assets/stylesheets/helpers/_media-queries.scss +2 -6
  86. data/vendor/assets/stylesheets/helpers/_shape-arrow.scss +1 -1
  87. data/vendor/assets/stylesheets/helpers/_spacing.scss +7 -6
  88. data/vendor/assets/stylesheets/helpers/_typography.scss +13 -12
  89. data/vendor/assets/stylesheets/helpers/_visually-hidden.scss +30 -30
  90. data/vendor/assets/stylesheets/objects/_form-group.scss +1 -4
  91. data/vendor/assets/stylesheets/objects/_grid.scss +3 -6
  92. data/vendor/assets/stylesheets/objects/_main-wrapper.scss +5 -4
  93. data/vendor/assets/stylesheets/objects/_width-container.scss +2 -4
  94. data/vendor/assets/stylesheets/overrides/_display.scss +12 -4
  95. data/vendor/assets/stylesheets/overrides/_spacing.scss +5 -3
  96. data/vendor/assets/stylesheets/overrides/_typography.scss +5 -3
  97. data/vendor/assets/stylesheets/overrides/_width.scss +6 -3
  98. data/vendor/assets/stylesheets/settings/_colours-applied.scss +11 -5
  99. data/vendor/assets/stylesheets/settings/_colours-organisations.scss +3 -0
  100. data/vendor/assets/stylesheets/settings/_colours-palette.scss +42 -35
  101. data/vendor/assets/stylesheets/settings/_compatibility.scss +0 -1
  102. data/vendor/assets/stylesheets/settings/_ie8.scss +1 -1
  103. data/vendor/assets/stylesheets/settings/_measurements.scss +4 -5
  104. data/vendor/assets/stylesheets/settings/_typography-font-families.scss +2 -2
  105. data/vendor/assets/stylesheets/settings/_typography-font.scss +14 -5
  106. data/vendor/assets/stylesheets/settings/_typography-responsive.scss +6 -2
  107. data/vendor/assets/stylesheets/tools/_compatibility.scss +1 -1
  108. data/vendor/assets/stylesheets/tools/_font-url.scss +1 -4
  109. data/vendor/assets/stylesheets/tools/_ie8.scss +1 -1
  110. data/vendor/assets/stylesheets/tools/_iff.scss +3 -1
  111. data/vendor/assets/stylesheets/tools/_image-url.scss +1 -4
  112. data/vendor/assets/stylesheets/tools/_px-to-em.scss +1 -1
  113. data/vendor/assets/stylesheets/tools/_px-to-rem.scss +1 -1
  114. data/vendor/assets/stylesheets/utilities/_visually-hidden.scss +0 -1
  115. data/vendor/assets/stylesheets/vendor/_sass-mq.scss +0 -4
  116. metadata +36 -3
@@ -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.
@@ -82,16 +84,16 @@
82
84
  @if $breakpoint == null {
83
85
 
84
86
  @if $direction == all {
85
- #{$property}: $breakpoint-value iff($important, !important);
87
+ #{$property}: $breakpoint-value if($important, !important, null);
86
88
  } @else {
87
- #{$property}-#{$direction}: $breakpoint-value iff($important, !important);
89
+ #{$property}-#{$direction}: $breakpoint-value if($important, !important, null);
88
90
  }
89
91
  } @else {
90
92
  @include govuk-media-query($from: $breakpoint) {
91
93
  @if $direction == all {
92
- #{$property}: $breakpoint-value iff($important, !important);
94
+ #{$property}: $breakpoint-value if($important, !important, null);
93
95
  } @else {
94
- #{$property}-#{$direction}: $breakpoint-value iff($important, !important);
96
+ #{$property}-#{$direction}: $breakpoint-value if($important, !important, null);
95
97
  }
96
98
  }
97
99
  }
@@ -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";
@@ -53,7 +53,7 @@
53
53
  /// @access public
54
54
 
55
55
  @mixin govuk-typography-weight-regular($important: false) {
56
- font-weight: $govuk-font-weight-regular iff($important, !important);
56
+ font-weight: $govuk-font-weight-regular if($important, !important, null);
57
57
  }
58
58
 
59
59
  /// Bold font weight helper
@@ -63,7 +63,7 @@
63
63
  /// @access public
64
64
 
65
65
  @mixin govuk-typography-weight-bold($important: false) {
66
- font-weight: $govuk-font-weight-bold iff($important, !important);
66
+ font-weight: $govuk-font-weight-bold if($important, !important, null);
67
67
  }
68
68
 
69
69
  /// Convert line-heights specified in pixels into a relative value, unless
@@ -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
  ),
@@ -137,14 +138,14 @@
137
138
  // Mark rules as !important if $important is true - this will result in
138
139
  // these variables becoming strings, so this needs to happen *after* they
139
140
  // are used in calculations
140
- $font-size: $font-size iff($important, !important);
141
- $font-size-rem: $font-size-rem iff($important, !important);
142
- $line-height: $line-height iff($important, !important);
141
+ $font-size: $font-size if($important, !important, null);
142
+ $font-size-rem: $font-size-rem if($important, !important, null);
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
@@ -14,26 +14,26 @@
14
14
  /// @access public
15
15
 
16
16
  @mixin govuk-visually-hidden($important: true) {
17
- position: absolute iff($important, !important);
17
+ position: absolute if($important, !important, null);
18
18
 
19
- width: 1px iff($important, !important);
20
- height: 1px iff($important, !important);
19
+ width: 1px if($important, !important, null);
20
+ height: 1px if($important, !important, null);
21
21
  // If margin is set to a negative value it can cause text to be announced in
22
22
  // the wrong order in VoiceOver for OSX
23
- margin: 0 iff($important, !important);
24
- padding: 0 iff($important, !important);
23
+ margin: 0 if($important, !important, null);
24
+ padding: 0 if($important, !important, null);
25
25
 
26
- overflow: hidden iff($important, !important);
27
- clip: rect(0 0 0 0) iff($important, !important);
28
- -webkit-clip-path: inset(50%) iff($important, !important);
29
- clip-path: inset(50%) iff($important, !important);
26
+ overflow: hidden if($important, !important, null);
27
+ clip: rect(0 0 0 0) if($important, !important, null);
28
+ -webkit-clip-path: inset(50%) if($important, !important, null);
29
+ clip-path: inset(50%) if($important, !important, null);
30
30
 
31
- border: 0 iff($important, !important);
31
+ border: 0 if($important, !important, null);
32
32
 
33
33
  // For long content, line feeds are not interpreted as spaces and small width
34
34
  // causes content to wrap 1 word per line:
35
35
  // https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
36
- white-space: nowrap iff($important, !important);
36
+ white-space: nowrap if($important, !important, null);
37
37
  }
38
38
 
39
39
  /// Hide an element visually, but have it available for screen readers whilst
@@ -48,37 +48,37 @@
48
48
  /// @access public
49
49
 
50
50
  @mixin govuk-visually-hidden-focusable($important: true) {
51
- position: absolute iff($important, !important);
51
+ position: absolute if($important, !important, null);
52
52
 
53
- width: 1px iff($important, !important);
54
- height: 1px iff($important, !important);
53
+ width: 1px if($important, !important, null);
54
+ height: 1px if($important, !important, null);
55
55
  // If margin is set to a negative value it can cause text to be announced in
56
56
  // the wrong order in VoiceOver for OSX
57
- margin: 0 iff($important, !important);
57
+ margin: 0 if($important, !important, null);
58
58
 
59
- overflow: hidden iff($important, !important);
60
- clip: rect(0 0 0 0) iff($important, !important);
61
- -webkit-clip-path: inset(50%) iff($important, !important);
62
- clip-path: inset(50%) iff($important, !important);
59
+ overflow: hidden if($important, !important, null);
60
+ clip: rect(0 0 0 0) if($important, !important, null);
61
+ -webkit-clip-path: inset(50%) if($important, !important, null);
62
+ clip-path: inset(50%) if($important, !important, null);
63
63
 
64
64
  // For long content, line feeds are not interpreted as spaces and small width
65
65
  // causes content to wrap 1 word per line:
66
66
  // https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
67
- white-space: nowrap iff($important, !important);
67
+ white-space: nowrap if($important, !important, null);
68
68
 
69
69
  &:active,
70
70
  &:focus {
71
- position: static iff($important, !important);
71
+ position: static if($important, !important, null);
72
72
 
73
- width: auto iff($important, !important);
74
- height: auto iff($important, !important);
75
- margin: inherit iff($important, !important);
73
+ width: auto if($important, !important, null);
74
+ height: auto if($important, !important, null);
75
+ margin: inherit if($important, !important, null);
76
76
 
77
- overflow: visible iff($important, !important);
78
- clip: auto iff($important, !important);
79
- -webkit-clip-path: none iff($important, !important);
80
- clip-path: none iff($important, !important);
77
+ overflow: visible if($important, !important, null);
78
+ clip: auto if($important, !important, null);
79
+ -webkit-clip-path: none if($important, !important, null);
80
+ clip-path: none if($important, !important, null);
81
81
 
82
- white-space: inherit iff($important, !important);
82
+ white-space: inherit if($important, !important, null);
83
83
  }
84
84
  }
@@ -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
@@ -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
  }
@@ -19,4 +21,10 @@
19
21
  .govuk-\!-display-none {
20
22
  display: none !important;
21
23
  }
24
+
25
+ @include govuk-media-query($media-type: print) {
26
+ .govuk-\!-display-none-print {
27
+ display: none !important;
28
+ }
29
+ }
22
30
  }
@@ -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;
@@ -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