govuk_publishing_components 21.60.0 → 21.62.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/components/checkboxes.js +102 -73
  3. data/app/assets/javascripts/govuk_publishing_components/ie.js +2 -0
  4. data/app/assets/javascripts/govuk_publishing_components/lib/govspeak/youtube-link-enhancement.js +1 -1
  5. data/app/assets/javascripts/govuk_publishing_components/vendor/html5shiv-printshiv.js +4 -0
  6. data/app/assets/javascripts/govuk_publishing_components/vendor/json2.js +487 -0
  7. data/app/assets/stylesheets/component_guide/application.scss +4 -0
  8. data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +1 -0
  9. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-footer.scss +8 -0
  10. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-for-public.scss +4 -0
  11. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-header.scss +87 -1
  12. data/app/assets/stylesheets/govuk_publishing_components/components/_radio.scss +1 -1
  13. data/app/assets/stylesheets/govuk_publishing_components/components/_search.scss +46 -0
  14. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_charts.scss +4 -2
  15. data/app/assets/stylesheets/govuk_publishing_components/govuk_frontend_support.scss +8 -0
  16. data/app/models/govuk_publishing_components/audit_applications.rb +35 -23
  17. data/app/models/govuk_publishing_components/audit_comparer.rb +13 -0
  18. data/app/models/govuk_publishing_components/audit_components.rb +1 -1
  19. data/app/models/govuk_publishing_components/component_example.rb +4 -0
  20. data/app/views/govuk_publishing_components/audit/show.html.erb +32 -3
  21. data/app/views/govuk_publishing_components/component_guide/component_doc/_component.html.erb +1 -0
  22. data/app/views/govuk_publishing_components/components/_image_card.html.erb +1 -1
  23. data/app/views/govuk_publishing_components/components/_layout_footer.html.erb +32 -21
  24. data/app/views/govuk_publishing_components/components/_layout_for_public.html.erb +76 -0
  25. data/app/views/govuk_publishing_components/components/_layout_header.html.erb +39 -51
  26. data/app/views/govuk_publishing_components/components/_search.html.erb +10 -5
  27. data/app/views/govuk_publishing_components/components/_share_links.html.erb +9 -9
  28. data/app/views/govuk_publishing_components/components/docs/govspeak.yml +45 -0
  29. data/app/views/govuk_publishing_components/components/docs/image_card.yml +13 -1
  30. data/app/views/govuk_publishing_components/components/docs/layout_footer.yml +17 -0
  31. data/app/views/govuk_publishing_components/components/docs/layout_for_admin.yml +5 -1
  32. data/app/views/govuk_publishing_components/components/docs/layout_for_public.yml +29 -0
  33. data/app/views/govuk_publishing_components/components/docs/layout_header.yml +34 -0
  34. data/app/views/govuk_publishing_components/components/docs/search.yml +6 -0
  35. data/app/views/govuk_publishing_components/components/layout_header/_header_logo.html.erb +23 -0
  36. data/app/views/govuk_publishing_components/components/layout_header/_navigation_items.html.erb +17 -0
  37. data/app/views/govuk_publishing_components/components/layout_header/_search.html.erb +9 -0
  38. data/config/initializers/assets.rb +8 -0
  39. data/lib/govuk_publishing_components.rb +1 -0
  40. data/lib/govuk_publishing_components/presenters/content_breadcrumbs_based_on_priority.rb +1 -0
  41. data/lib/govuk_publishing_components/presenters/image_card_helper.rb +3 -2
  42. data/lib/govuk_publishing_components/presenters/public_layout_helper.rb +380 -0
  43. data/lib/govuk_publishing_components/version.rb +1 -1
  44. data/node_modules/govuk-frontend/govuk/all.js +160 -57
  45. data/node_modules/govuk-frontend/govuk/components/character-count/_index.scss +0 -4
  46. data/node_modules/govuk-frontend/govuk/components/character-count/character-count.js +16 -8
  47. data/node_modules/govuk-frontend/govuk/components/character-count/macro-options.json +6 -0
  48. data/node_modules/govuk-frontend/govuk/components/character-count/template.njk +1 -0
  49. data/node_modules/govuk-frontend/govuk/components/checkboxes/_index.scss +6 -5
  50. data/node_modules/govuk-frontend/govuk/components/checkboxes/checkboxes.js +68 -21
  51. data/node_modules/govuk-frontend/govuk/components/date-input/macro-options.json +1 -1
  52. data/node_modules/govuk-frontend/govuk/components/file-upload/_index.scss +0 -27
  53. data/node_modules/govuk-frontend/govuk/components/footer/_index.scss +0 -3
  54. data/node_modules/govuk-frontend/govuk/components/footer/template.njk +1 -1
  55. data/node_modules/govuk-frontend/govuk/components/header/template.njk +1 -1
  56. data/node_modules/govuk-frontend/govuk/components/hint/_index.scss +2 -2
  57. data/node_modules/govuk-frontend/govuk/components/hint/template.njk +2 -2
  58. data/node_modules/govuk-frontend/govuk/components/input/_index.scss +0 -3
  59. data/node_modules/govuk-frontend/govuk/components/input/macro-options.json +6 -0
  60. data/node_modules/govuk-frontend/govuk/components/input/template.njk +1 -0
  61. data/node_modules/govuk-frontend/govuk/components/radios/radios.js +76 -28
  62. data/node_modules/govuk-frontend/govuk/components/select/_index.scss +0 -3
  63. data/node_modules/govuk-frontend/govuk/components/skip-link/_index.scss +1 -0
  64. data/node_modules/govuk-frontend/govuk/components/textarea/_index.scss +0 -3
  65. data/node_modules/govuk-frontend/govuk/components/textarea/macro-options.json +6 -0
  66. data/node_modules/govuk-frontend/govuk/components/textarea/template.njk +1 -0
  67. data/node_modules/govuk-frontend/govuk/components/warning-text/_index.scss +4 -2
  68. data/node_modules/govuk-frontend/govuk/helpers/_colour.scss +1 -1
  69. data/node_modules/govuk-frontend/govuk/settings/_colours-applied.scss +2 -2
  70. data/node_modules/govuk-frontend/govuk/settings/_colours-palette.scss +33 -33
  71. data/node_modules/govuk-frontend/govuk/settings/_measurements.scss +4 -1
  72. data/node_modules/govuk-frontend/package.json +1 -1
  73. metadata +12 -2
@@ -45,7 +45,7 @@
45
45
  "name": "autocomplete",
46
46
  "type": "string",
47
47
  "required": false,
48
- "description": "Attribute to [identify input purpose](https://www.w3.org/WAI/WCAG21/Understanding/identify-input-purpose.html), for instance \"postal-code\" or \"username\". See [autofill](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill) for full list of attributes that can be used."
48
+ "description": "Attribute to [identify input purpose](https://www.w3.org/WAI/WCAG21/Understanding/identify-input-purpose.html), for instance \"bday-day\". See [autofill](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill) for full list of attributes that can be used."
49
49
  },
50
50
  {
51
51
  "name": "pattern",
@@ -47,31 +47,4 @@
47
47
  box-shadow: inset 0 0 0 4px $govuk-input-border-colour;
48
48
  }
49
49
  }
50
-
51
- .govuk-file-upload--error {
52
- // As `upload--error` has border, it needs to have the same padding as
53
- // the standard focused element.
54
- margin-right: -$component-padding;
55
- margin-left: -$component-padding;
56
- padding-right: $component-padding;
57
- padding-left: $component-padding;
58
- border: $govuk-border-width-form-element-error solid $govuk-error-colour;
59
-
60
- &:focus {
61
- border-color: $govuk-input-border-colour;
62
- // Remove `box-shadow` inherited from `:focus` as `file-upload--error`
63
- // already has the thicker border.
64
- box-shadow: none;
65
- }
66
-
67
- // Repeat `:focus` styles to prevent error styles from being applied when
68
- // input button is pressed as this moves the focus to "within".
69
- // This can't be set together with `:focus` as all versions of IE fail
70
- // to recognise `focus-within` and don't set any styles from the block
71
- // when it's a selector.
72
- &:focus-within {
73
- border-color: $govuk-input-border-colour;
74
- box-shadow: none;
75
- }
76
- }
77
50
  }
@@ -210,20 +210,17 @@
210
210
  padding: 0;
211
211
  list-style: none;
212
212
  -webkit-column-gap: $govuk-gutter;
213
- -moz-column-gap: $govuk-gutter;
214
213
  column-gap: $govuk-gutter; // Support: Columns
215
214
  }
216
215
 
217
216
  @include govuk-media-query ($from: desktop) {
218
217
  .govuk-footer__list--columns-2 {
219
218
  -webkit-column-count: 2;
220
- -moz-column-count: 2;
221
219
  column-count: 2; // Support: Columns
222
220
  }
223
221
 
224
222
  .govuk-footer__list--columns-3 {
225
223
  -webkit-column-count: 3;
226
- -moz-column-count: 3;
227
224
  column-count: 3; // Support: Columns
228
225
  }
229
226
  }
@@ -58,7 +58,7 @@
58
58
  focusable="false"
59
59
  class="govuk-footer__licence-logo"
60
60
  xmlns="http://www.w3.org/2000/svg"
61
- viewbox="0 0 483.2 195.7"
61
+ viewBox="0 0 483.2 195.7"
62
62
  height="17"
63
63
  width="41"
64
64
  >
@@ -21,7 +21,7 @@
21
21
  focusable="false"
22
22
  class="govuk-header__logotype-crown"
23
23
  xmlns="http://www.w3.org/2000/svg"
24
- viewbox="0 0 132 97"
24
+ viewBox="0 0 132 97"
25
25
  height="30"
26
26
  width="36"
27
27
  >
@@ -16,7 +16,7 @@
16
16
  // is unlikely that the default or govuk-label--s class would be used in this
17
17
  // case.
18
18
 
19
- // This adjustment will not work in browsers that do not support :not().
19
+ // This adjustment will not work in browsers that do not support :not().
20
20
  // Users with these browsers will see the default size margin (5px larger).
21
21
 
22
22
  .govuk-label:not(.govuk-label--m):not(.govuk-label--l):not(.govuk-label--xl) + .govuk-hint {
@@ -30,7 +30,7 @@
30
30
  // it is unlikely that the default or govuk-fieldset__legend--s class would be
31
31
  // used in this case.
32
32
 
33
- // This adjustment will not work in browsers that do not support :not().
33
+ // This adjustment will not work in browsers that do not support :not().
34
34
  // Users with these browsers will see the default size margin (5px larger).
35
35
 
36
36
  .govuk-fieldset__legend:not(.govuk-fieldset__legend--m):not(.govuk-fieldset__legend--l):not(.govuk-fieldset__legend--xl) + .govuk-hint {
@@ -1,4 +1,4 @@
1
- <span {%- if params.id %} id="{{ params.id }}"{% endif %} class="govuk-hint {%- if params.classes %} {{ params.classes }}{% endif %}"
1
+ <div {%- if params.id %} id="{{ params.id }}"{% endif %} class="govuk-hint {%- if params.classes %} {{ params.classes }}{% endif %}"
2
2
  {%- for attribute, value in params.attributes %} {{attribute}}="{{value}}"{% endfor %}>
3
3
  {{ params.html | safe if params.html else params.text }}
4
- </span>
4
+ </div>
@@ -58,9 +58,6 @@
58
58
 
59
59
  &:focus {
60
60
  border-color: $govuk-input-border-colour;
61
- // Remove `box-shadow` inherited from `:focus` as `input--error`
62
- // already has the thicker border.
63
- box-shadow: none;
64
61
  }
65
62
  }
66
63
 
@@ -88,6 +88,12 @@
88
88
  "required": false,
89
89
  "description": "Attribute to [provide a regular expression pattern](https://www.w3.org/TR/html51/sec-forms.html#the-pattern-attribute), used to match allowed character combinations for the input value."
90
90
  },
91
+ {
92
+ "name": "spellcheck",
93
+ "type": "boolean",
94
+ "required": false,
95
+ "description": "Optional field to enable or disable the spellcheck attribute on the input."
96
+ },
91
97
  {
92
98
  "name": "attributes",
93
99
  "type": "object",
@@ -38,6 +38,7 @@
38
38
  }) | indent(2) | trim }}
39
39
  {% endif %}
40
40
  <input class="govuk-input {%- if params.classes %} {{ params.classes }}{% endif %} {%- if params.errorMessage %} govuk-input--error{% endif %}" id="{{ params.id }}" name="{{ params.name }}" type="{{ params.type | default('text') }}"
41
+ {%- if (params.spellcheck === false) or (params.spellcheck === true) %} spellcheck="{{ params.spellcheck }}"{% endif %}
41
42
  {%- if params.value %} value="{{ params.value}}"{% endif %}
42
43
  {%- if describedBy %} aria-describedby="{{ describedBy }}"{% endif %}
43
44
  {%- if params.autocomplete %} autocomplete="{{ params.autocomplete}}"{% endif %}
@@ -1030,67 +1030,115 @@ function nodeListForEach (nodes, callback) {
1030
1030
 
1031
1031
  function Radios ($module) {
1032
1032
  this.$module = $module;
1033
+ this.$inputs = $module.querySelectorAll('input[type="radio"]');
1033
1034
  }
1034
1035
 
1036
+ /**
1037
+ * Initialise Radios
1038
+ *
1039
+ * Radios can be associated with a 'conditionally revealed' content block – for
1040
+ * example, a radio for 'Phone' could reveal an additional form field for the
1041
+ * user to enter their phone number.
1042
+ *
1043
+ * These associations are made using a `data-aria-controls` attribute, which is
1044
+ * promoted to an aria-controls attribute during initialisation.
1045
+ *
1046
+ * We also need to restore the state of any conditional reveals on the page (for
1047
+ * example if the user has navigated back), and set up event handlers to keep
1048
+ * the reveal in sync with the radio state.
1049
+ */
1035
1050
  Radios.prototype.init = function () {
1036
1051
  var $module = this.$module;
1037
- var $inputs = $module.querySelectorAll('input[type="radio"]');
1052
+ var $inputs = this.$inputs;
1038
1053
 
1039
- /**
1040
- * Loop over all items with [data-controls]
1041
- * Check if they have a matching conditional reveal
1042
- * If they do, assign attributes.
1043
- **/
1044
1054
  nodeListForEach($inputs, function ($input) {
1045
- var controls = $input.getAttribute('data-aria-controls');
1055
+ var target = $input.getAttribute('data-aria-controls');
1046
1056
 
1047
- // Check if input controls anything
1048
- // Check if content exists, before setting attributes.
1049
- if (!controls || !$module.querySelector('#' + controls)) {
1057
+ // Skip radios without data-aria-controls attributes, or where the
1058
+ // target element does not exist.
1059
+ if (!target || !$module.querySelector('#' + target)) {
1050
1060
  return
1051
1061
  }
1052
1062
 
1053
- // If we have content that is controlled, set attributes.
1054
- $input.setAttribute('aria-controls', controls);
1063
+ // Promote the data-aria-controls attribute to a aria-controls attribute
1064
+ // so that the relationship is exposed in the AOM
1065
+ $input.setAttribute('aria-controls', target);
1055
1066
  $input.removeAttribute('data-aria-controls');
1056
- this.setAttributes($input);
1057
- }.bind(this));
1067
+ });
1068
+
1069
+ // When the page is restored after navigating 'back' in some browsers the
1070
+ // state of form controls is not restored until *after* the DOMContentLoaded
1071
+ // event is fired, so we need to sync after the pageshow event in browsers
1072
+ // that support it.
1073
+ if ('onpageshow' in window) {
1074
+ window.addEventListener('pageshow', this.syncAllConditionalReveals.bind(this));
1075
+ } else {
1076
+ window.addEventListener('DOMContentLoaded', this.syncAllConditionalReveals.bind(this));
1077
+ }
1078
+
1079
+ // Although we've set up handlers to sync state on the pageshow or
1080
+ // DOMContentLoaded event, init could be called after those events have fired,
1081
+ // for example if they are added to the page dynamically, so sync now too.
1082
+ this.syncAllConditionalReveals();
1058
1083
 
1059
1084
  // Handle events
1060
1085
  $module.addEventListener('click', this.handleClick.bind(this));
1061
1086
  };
1062
1087
 
1063
- Radios.prototype.setAttributes = function ($input) {
1064
- var $content = document.querySelector('#' + $input.getAttribute('aria-controls'));
1088
+ /**
1089
+ * Sync the conditional reveal states for all inputs in this $module.
1090
+ */
1091
+ Radios.prototype.syncAllConditionalReveals = function () {
1092
+ nodeListForEach(this.$inputs, this.syncConditionalRevealWithInputState.bind(this));
1093
+ };
1065
1094
 
1066
- if ($content && $content.classList.contains('govuk-radios__conditional')) {
1095
+ /**
1096
+ * Sync conditional reveal with the input state
1097
+ *
1098
+ * Synchronise the visibility of the conditional reveal, and its accessible
1099
+ * state, with the input's checked state.
1100
+ *
1101
+ * @param {HTMLInputElement} $input Radio input
1102
+ */
1103
+ Radios.prototype.syncConditionalRevealWithInputState = function ($input) {
1104
+ var $target = document.querySelector('#' + $input.getAttribute('aria-controls'));
1105
+
1106
+ if ($target && $target.classList.contains('govuk-radios__conditional')) {
1067
1107
  var inputIsChecked = $input.checked;
1068
1108
 
1069
1109
  $input.setAttribute('aria-expanded', inputIsChecked);
1070
-
1071
- $content.classList.toggle('govuk-radios__conditional--hidden', !inputIsChecked);
1110
+ $target.classList.toggle('govuk-radios__conditional--hidden', !inputIsChecked);
1072
1111
  }
1073
1112
  };
1074
1113
 
1114
+ /**
1115
+ * Click event handler
1116
+ *
1117
+ * Handle a click within the $module – if the click occurred on a radio, sync
1118
+ * the state of the conditional reveal for all radio buttons in the same form
1119
+ * with the same name (because checking one radio could have un-checked a radio
1120
+ * in another $module)
1121
+ *
1122
+ * @param {MouseEvent} event Click event
1123
+ */
1075
1124
  Radios.prototype.handleClick = function (event) {
1076
1125
  var $clickedInput = event.target;
1077
- // We only want to handle clicks for radio inputs
1126
+
1127
+ // Ignore clicks on things that aren't radio buttons
1078
1128
  if ($clickedInput.type !== 'radio') {
1079
1129
  return
1080
1130
  }
1081
- // Because checking one radio can uncheck a radio in another $module,
1082
- // we need to call set attributes on all radios in the same form, or document if they're not in a form.
1083
- //
1084
- // We also only want radios which have aria-controls, as they support conditional reveals.
1131
+
1132
+ // We only need to consider radios with conditional reveals, which will have
1133
+ // aria-controls attributes.
1085
1134
  var $allInputs = document.querySelectorAll('input[type="radio"][aria-controls]');
1135
+
1086
1136
  nodeListForEach($allInputs, function ($input) {
1087
- // Only inputs with the same form owner should change.
1088
1137
  var hasSameFormOwner = ($input.form === $clickedInput.form);
1089
-
1090
- // In radios, only radios with the same name will affect each other.
1091
1138
  var hasSameName = ($input.name === $clickedInput.name);
1139
+
1092
1140
  if (hasSameName && hasSameFormOwner) {
1093
- this.setAttributes($input);
1141
+ this.syncConditionalRevealWithInputState($input);
1094
1142
  }
1095
1143
  }.bind(this));
1096
1144
  };
@@ -44,9 +44,6 @@
44
44
 
45
45
  &:focus {
46
46
  border-color: $govuk-input-border-colour;
47
- // Remove `box-shadow` inherited from `:focus` as `select--error`
48
- // already has the thicker border.
49
- box-shadow: none;
50
47
  }
51
48
  }
52
49
 
@@ -21,6 +21,7 @@
21
21
 
22
22
  &:focus {
23
23
  outline: $govuk-focus-width solid $govuk-focus-colour;
24
+ outline-offset: 0;
24
25
  background-color: $govuk-focus-colour;
25
26
 
26
27
  // Undo unwanted changes when global styles are enabled
@@ -42,9 +42,6 @@
42
42
 
43
43
  &:focus {
44
44
  border-color: $govuk-input-border-colour;
45
- // Remove `box-shadow` inherited from `:focus` as `textarea--error`
46
- // already has the thicker border.
47
- box-shadow: none;
48
45
  }
49
46
 
50
47
  }
@@ -11,6 +11,12 @@
11
11
  "required": true,
12
12
  "description": "The name of the textarea, which is submitted with the form data."
13
13
  },
14
+ {
15
+ "name": "spellcheck",
16
+ "type": "boolean",
17
+ "required": false,
18
+ "description": "Optional field to enable or disable the spellcheck attribute on the textarea."
19
+ },
14
20
  {
15
21
  "name": "rows",
16
22
  "type": "string",
@@ -38,6 +38,7 @@
38
38
  }) | indent(2) | trim }}
39
39
  {% endif %}
40
40
  <textarea class="govuk-textarea {{- ' govuk-textarea--error' if params.errorMessage }} {{- ' ' + params.classes if params.classes}}" id="{{ params.id }}" name="{{ params.name }}" rows="{%if params.rows %} {{- params.rows -}} {% else %}5{%endif %}"
41
+ {%- if (params.spellcheck === false) or (params.spellcheck === true) %} spellcheck="{{ params.spellcheck }}"{% endif %}
41
42
  {%- if describedBy %} aria-describedby="{{ describedBy }}"{% endif %}
42
43
  {%- if params.autocomplete %} autocomplete="{{ params.autocomplete}}"{% endif %}
43
44
  {%- for attribute, value in params.attributes %} {{attribute}}="{{value}}"{% endfor %}>{{ params.value }}</textarea>
@@ -13,13 +13,15 @@
13
13
  .govuk-warning-text__icon {
14
14
  @include govuk-font($size: false, $weight: bold);
15
15
 
16
+ box-sizing: border-box;
17
+
16
18
  display: inline-block;
17
19
 
18
20
  position: absolute;
19
21
  left: 0;
20
22
 
21
- min-width: 29px;
22
- min-height: 29px;
23
+ min-width: 35px;
24
+ min-height: 35px;
23
25
  margin-top: -7px;
24
26
 
25
27
  @include govuk-media-query($from: tablet) {
@@ -52,7 +52,7 @@
52
52
  /// colour will be returned which meets contrast requirements . If you want to
53
53
  /// use the non-websafe version you can set this to `false` but your should
54
54
  /// ensure that you still meets contrast requirements for accessibility - for
55
- /// example, don't use the non-websafe version for text.
55
+ /// example, do not use the non-websafe version for text.
56
56
  ///
57
57
  /// @return {Colour} Representation of colour for organisation
58
58
  /// @throw if `$organisation` is not a known organisation
@@ -52,7 +52,7 @@ $govuk-print-text-colour: #000000 !default;
52
52
 
53
53
  /// Secondary text colour
54
54
  ///
55
- /// Used for 'muted' text, help text, etc.
55
+ /// Used in for example 'muted' text and help text.
56
56
  ///
57
57
  /// @type Colour
58
58
  /// @access public
@@ -90,7 +90,7 @@ $govuk-error-colour: govuk-colour("red") !default;
90
90
 
91
91
  /// Border colour
92
92
  ///
93
- /// Used for borders, separators, rules, keylines etc.
93
+ /// Used in for example borders, separators, rules and keylines.
94
94
  ///
95
95
  /// @type Colour
96
96
  /// @access public
@@ -19,6 +19,39 @@ $govuk-use-legacy-palette: if((
19
19
  $govuk-compatibility-govukelements
20
20
  ), true, false) !default;
21
21
 
22
+ /// Modern colour palette
23
+ ///
24
+ /// This exists only because you cannot easily set a !default variable
25
+ /// conditionally (thanks to the way scope works in Sass) so we set
26
+ /// `$govuk-colour-palette` using the `if` function.
27
+ ///
28
+ /// @access private
29
+
30
+ $_govuk-colour-palette-modern: (
31
+ "red": #d4351c,
32
+ "yellow": #ffdd00,
33
+ "green": #00703c,
34
+ "blue": #1d70b8,
35
+ "dark-blue": #003078,
36
+ "light-blue": #5694ca,
37
+ "purple": #4c2c92,
38
+
39
+ "black": #0b0c0c,
40
+ "dark-grey": #505a5f,
41
+ "mid-grey": #b1b4b6,
42
+ "light-grey": #f3f2f1,
43
+ "white": #ffffff,
44
+
45
+ "light-purple": #6f72af,
46
+ "bright-purple": #912b88,
47
+ "pink": #d53880,
48
+ "light-pink": #f499be,
49
+ "orange": #f47738,
50
+ "brown": #b58840,
51
+ "light-green": #85994b,
52
+ "turquoise": #28a197
53
+ );
54
+
22
55
  /// Legacy colour palette
23
56
  ///
24
57
  /// This exists only because you cannot easily set a !default variable
@@ -52,39 +85,6 @@ $_govuk-colour-palette-legacy: (
52
85
  "white": #ffffff
53
86
  );
54
87
 
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
88
  /// Colour palette
89
89
  ///
90
90
  /// @type Map