govuk_publishing_components 11.0.0 → 11.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/admin_scripts.js +1 -1
  3. data/app/assets/javascripts/govuk_publishing_components/components/radio.js +1 -1
  4. data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +11 -3
  5. data/app/assets/stylesheets/govuk_publishing_components/admin_styles.scss +2 -4
  6. data/app/assets/stylesheets/govuk_publishing_components/admin_styles_ie8.scss +2 -1
  7. data/app/assets/stylesheets/govuk_publishing_components/components/_back-link.scss +2 -6
  8. data/app/assets/stylesheets/govuk_publishing_components/components/_button.scss +3 -9
  9. data/app/assets/stylesheets/govuk_publishing_components/components/_details.scss +2 -1
  10. data/app/assets/stylesheets/govuk_publishing_components/components/_error-message.scss +2 -6
  11. data/app/assets/stylesheets/govuk_publishing_components/components/_file-upload.scss +3 -7
  12. data/app/assets/stylesheets/govuk_publishing_components/components/_hint.scss +2 -6
  13. data/app/assets/stylesheets/govuk_publishing_components/components/_input.scss +3 -7
  14. data/app/assets/stylesheets/govuk_publishing_components/components/_inset-text.scss +2 -1
  15. data/app/assets/stylesheets/govuk_publishing_components/components/_label.scss +2 -6
  16. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-footer.scss +2 -1
  17. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-header.scss +2 -13
  18. data/app/assets/stylesheets/govuk_publishing_components/components/_panel.scss +2 -6
  19. data/app/assets/stylesheets/govuk_publishing_components/components/_radio.scss +3 -8
  20. data/app/assets/stylesheets/govuk_publishing_components/components/_select.scss +2 -1
  21. data/app/assets/stylesheets/govuk_publishing_components/components/_skip-link.scss +2 -1
  22. data/app/assets/stylesheets/govuk_publishing_components/components/_table.scss +15 -10
  23. data/app/assets/stylesheets/govuk_publishing_components/components/_tabs.scss +2 -1
  24. data/app/assets/stylesheets/govuk_publishing_components/components/_textarea.scss +3 -1
  25. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_button.scss +1 -1
  26. data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_govuk-frontend-settings.scss +5 -0
  27. data/app/views/govuk_publishing_components/components/_admin_analytics.html.erb +10 -0
  28. data/app/views/govuk_publishing_components/components/_file_upload.html.erb +1 -1
  29. data/app/views/govuk_publishing_components/components/_input.html.erb +7 -5
  30. data/app/views/govuk_publishing_components/components/_layout_footer.html.erb +43 -1
  31. data/app/views/govuk_publishing_components/components/_textarea.html.erb +1 -1
  32. data/app/views/govuk_publishing_components/components/docs/admin_analytics.yml +9 -0
  33. data/app/views/govuk_publishing_components/components/docs/details.yml +1 -2
  34. data/app/views/govuk_publishing_components/components/docs/input.yml +9 -0
  35. data/app/views/govuk_publishing_components/components/docs/inset_text.yml +1 -2
  36. data/app/views/govuk_publishing_components/components/docs/layout_footer.yml +117 -3
  37. data/app/views/govuk_publishing_components/components/docs/select.yml +1 -2
  38. data/app/views/govuk_publishing_components/components/docs/textarea.yml +1 -2
  39. data/config/initializers/assets.rb +1 -1
  40. data/lib/govuk_publishing_components.rb +1 -0
  41. data/lib/govuk_publishing_components/app_helpers/environment.rb +18 -0
  42. data/lib/govuk_publishing_components/version.rb +1 -1
  43. data/node_modules/govuk-frontend/all.js +3 -1
  44. data/node_modules/govuk-frontend/assets/images/favicon.ico +0 -0
  45. data/node_modules/govuk-frontend/components/back-link/macro-options.json +32 -0
  46. data/node_modules/govuk-frontend/components/breadcrumbs/README.md +12 -0
  47. data/node_modules/govuk-frontend/components/breadcrumbs/macro-options.json +40 -0
  48. data/node_modules/govuk-frontend/components/breadcrumbs/template.njk +1 -1
  49. data/node_modules/govuk-frontend/components/button/_button.scss +4 -9
  50. data/node_modules/govuk-frontend/components/button/macro-options.json +62 -0
  51. data/node_modules/govuk-frontend/components/checkboxes/_checkboxes.scss +2 -4
  52. data/node_modules/govuk-frontend/components/checkboxes/macro-options.json +129 -0
  53. data/node_modules/govuk-frontend/components/date-input/README.md +19 -7
  54. data/node_modules/govuk-frontend/components/date-input/macro-options.json +85 -0
  55. data/node_modules/govuk-frontend/components/date-input/template.njk +2 -22
  56. data/node_modules/govuk-frontend/components/details/_details.scss +3 -0
  57. data/node_modules/govuk-frontend/components/details/macro-options.json +50 -0
  58. data/node_modules/govuk-frontend/components/error-message/macro-options.json +32 -0
  59. data/node_modules/govuk-frontend/components/error-summary/README.md +12 -0
  60. data/node_modules/govuk-frontend/components/error-summary/_error-summary.scss +7 -3
  61. data/node_modules/govuk-frontend/components/error-summary/macro-options.json +70 -0
  62. data/node_modules/govuk-frontend/components/error-summary/template.njk +1 -1
  63. data/node_modules/govuk-frontend/components/fieldset/_fieldset.scss +1 -2
  64. data/node_modules/govuk-frontend/components/fieldset/macro-options.json +58 -0
  65. data/node_modules/govuk-frontend/components/file-upload/macro-options.json +53 -0
  66. data/node_modules/govuk-frontend/components/footer/README.md +48 -0
  67. data/node_modules/govuk-frontend/components/footer/_footer.scss +10 -2
  68. data/node_modules/govuk-frontend/components/footer/macro-options.json +100 -0
  69. data/node_modules/govuk-frontend/components/footer/template.njk +19 -12
  70. data/node_modules/govuk-frontend/components/header/README.md +14 -2
  71. data/node_modules/govuk-frontend/components/header/_header.scss +9 -1
  72. data/node_modules/govuk-frontend/components/header/macro-options.json +88 -0
  73. data/node_modules/govuk-frontend/components/header/template.njk +2 -2
  74. data/node_modules/govuk-frontend/components/hint/macro-options.json +32 -0
  75. data/node_modules/govuk-frontend/components/input/README.md +1 -1
  76. data/node_modules/govuk-frontend/components/input/_input.scss +1 -3
  77. data/node_modules/govuk-frontend/components/input/macro-options.json +52 -0
  78. data/node_modules/govuk-frontend/components/inset-text/macro-options.json +32 -0
  79. data/node_modules/govuk-frontend/components/label/macro-options.json +38 -0
  80. data/node_modules/govuk-frontend/components/panel/README.md +5 -5
  81. data/node_modules/govuk-frontend/components/panel/_panel.scss +1 -3
  82. data/node_modules/govuk-frontend/components/panel/macro-options.json +44 -0
  83. data/node_modules/govuk-frontend/components/panel/template.njk +1 -2
  84. data/node_modules/govuk-frontend/components/phase-banner/macro-options.json +33 -0
  85. data/node_modules/govuk-frontend/components/radios/_radios.scss +10 -4
  86. data/node_modules/govuk-frontend/components/radios/macro-options.json +135 -0
  87. data/node_modules/govuk-frontend/components/radios/template.njk +1 -1
  88. data/node_modules/govuk-frontend/components/select/README.md +63 -0
  89. data/node_modules/govuk-frontend/components/select/_select.scss +1 -4
  90. data/node_modules/govuk-frontend/components/select/macro-options.json +79 -0
  91. data/node_modules/govuk-frontend/components/select/template.njk +4 -1
  92. data/node_modules/govuk-frontend/components/skip-link/macro-options.json +32 -0
  93. data/node_modules/govuk-frontend/components/table/_table.scss +7 -4
  94. data/node_modules/govuk-frontend/components/table/macro-options.json +108 -0
  95. data/node_modules/govuk-frontend/components/tabs/README.md +29 -5
  96. data/node_modules/govuk-frontend/components/tabs/_tabs.scss +1 -1
  97. data/node_modules/govuk-frontend/components/tabs/macro-options.json +58 -0
  98. data/node_modules/govuk-frontend/components/tabs/tabs.js +3 -1
  99. data/node_modules/govuk-frontend/components/tabs/template.njk +3 -2
  100. data/node_modules/govuk-frontend/components/tag/macro-options.json +26 -0
  101. data/node_modules/govuk-frontend/components/textarea/_textarea.scss +4 -3
  102. data/node_modules/govuk-frontend/components/textarea/macro-options.json +65 -0
  103. data/node_modules/govuk-frontend/components/warning-text/macro-options.json +32 -0
  104. data/node_modules/govuk-frontend/core/_links.scss +1 -14
  105. data/node_modules/govuk-frontend/core/_lists.scss +0 -18
  106. data/node_modules/govuk-frontend/helpers/_grid.scss +1 -2
  107. data/node_modules/govuk-frontend/helpers/_links.scss +52 -1
  108. data/node_modules/govuk-frontend/overrides/_width.scss +4 -0
  109. data/node_modules/govuk-frontend/package.json +19 -19
  110. data/node_modules/govuk-frontend/settings/_colours-applied.scss +10 -0
  111. data/node_modules/govuk-frontend/settings/_compatibility.scss +3 -3
  112. data/node_modules/govuk-frontend/settings/_typography-responsive.scss +10 -3
  113. data/node_modules/govuk-frontend/template.njk +1 -1
  114. data/node_modules/govuk-frontend/utilities/_visually-hidden.scss +0 -5
  115. metadata +32 -2
@@ -24,7 +24,7 @@ Find out when to use the tabs component in your service in the [GOV.UK Design Sy
24
24
  <ul class="govuk-tabs__list">
25
25
 
26
26
  <li class="govuk-tabs__list-item">
27
- <a class="govuk-tabs__tab" href="#past-day">
27
+ <a class="govuk-tabs__tab govuk-tabs__tab--selected" href="#past-day">
28
28
  Past day
29
29
  </a>
30
30
  </li>
@@ -80,7 +80,7 @@ Find out when to use the tabs component in your service in the [GOV.UK Design Sy
80
80
 
81
81
  </section>
82
82
 
83
- <section class="govuk-tabs__panel" id="past-week">
83
+ <section class="govuk-tabs__panel govuk-tabs__panel--hidden" id="past-week">
84
84
  <h2 class="govuk-heading-l">Past week</h2>
85
85
  <table class="govuk-table">
86
86
  <thead class="govuk-table__head">
@@ -111,7 +111,7 @@ Find out when to use the tabs component in your service in the [GOV.UK Design Sy
111
111
 
112
112
  </section>
113
113
 
114
- <section class="govuk-tabs__panel" id="past-month">
114
+ <section class="govuk-tabs__panel govuk-tabs__panel--hidden" id="past-month">
115
115
  <h2 class="govuk-heading-l">Past month</h2>
116
116
  <table class="govuk-table">
117
117
  <thead class="govuk-table__head">
@@ -142,7 +142,7 @@ Find out when to use the tabs component in your service in the [GOV.UK Design Sy
142
142
 
143
143
  </section>
144
144
 
145
- <section class="govuk-tabs__panel" id="past-year">
145
+ <section class="govuk-tabs__panel govuk-tabs__panel--hidden" id="past-year">
146
146
  <h2 class="govuk-heading-l">Past year</h2>
147
147
  <table class="govuk-table">
148
148
  <thead class="govuk-table__head">
@@ -286,7 +286,7 @@ If you are using Nunjucks,then macros take the following arguments
286
286
 
287
287
  <td class="govuk-table__cell ">No</td>
288
288
 
289
- <td class="govuk-table__cell ">Any extra HTML attributes (for example data attributes) to add to the details element</td>
289
+ <td class="govuk-table__cell ">Any extra HTML attributes (for example data attributes) to add to the tabs container</td>
290
290
 
291
291
  </tr>
292
292
 
@@ -340,6 +340,18 @@ If you are using Nunjucks,then macros take the following arguments
340
340
 
341
341
  <tr class="govuk-table__row">
342
342
 
343
+ <th class="govuk-table__header" scope="row">items.{}.attributes</th>
344
+
345
+ <td class="govuk-table__cell ">object</td>
346
+
347
+ <td class="govuk-table__cell ">No</td>
348
+
349
+ <td class="govuk-table__cell ">Any extra HTML attributes (for example data attributes) to add to the tab item anchor.</td>
350
+
351
+ </tr>
352
+
353
+ <tr class="govuk-table__row">
354
+
343
355
  <th class="govuk-table__header" scope="row">items.{}.panel.text (or) items.{}.panel.html</th>
344
356
 
345
357
  <td class="govuk-table__cell ">string</td>
@@ -350,6 +362,18 @@ If you are using Nunjucks,then macros take the following arguments
350
362
 
351
363
  </tr>
352
364
 
365
+ <tr class="govuk-table__row">
366
+
367
+ <th class="govuk-table__header" scope="row">items.{}.panel.attributes</th>
368
+
369
+ <td class="govuk-table__cell ">object</td>
370
+
371
+ <td class="govuk-table__cell ">No</td>
372
+
373
+ <td class="govuk-table__cell ">Any extra HTML attributes (for example data attributes) to add to the tab panel.</td>
374
+
375
+ </tr>
376
+
353
377
  </tbody>
354
378
 
355
379
  </table>
@@ -86,7 +86,7 @@
86
86
  text-align: center;
87
87
  text-decoration: none;
88
88
 
89
- &[aria-selected= "true"] {
89
+ &--selected {
90
90
  margin-top: - govuk-spacing(1);
91
91
  margin-bottom: -1px;
92
92
 
@@ -0,0 +1,58 @@
1
+ [
2
+ {
3
+ "name": "id",
4
+ "type": "string",
5
+ "required": false,
6
+ "description": "This is used for the main component and to compose id attribute for each item."
7
+ },
8
+ {
9
+ "name": "idPrefix",
10
+ "type": "string",
11
+ "required": false,
12
+ "description": "String to prefix id for each tab item if no id is specified on each item"
13
+ },
14
+ {
15
+ "name": "items",
16
+ "type": "array",
17
+ "required": true,
18
+ "description": "Array of tab items.",
19
+ "params": [
20
+ {
21
+ "name": "id",
22
+ "type": "string",
23
+ "required": true,
24
+ "description": "Specific id attribute for the tab item. If omitted, then `idPrefix` string will be applied."
25
+ },
26
+ {
27
+ "name": "label",
28
+ "type": "string",
29
+ "required": true,
30
+ "description": "The text label of a tab item."
31
+ },
32
+ {
33
+ "name": "panel.text",
34
+ "type": "string",
35
+ "required": true,
36
+ "description": "If `html` is set, this is not required. Text to use within each tab panel. If `html` is provided, the `text` argument will be ignored."
37
+ },
38
+ {
39
+ "name": "panel.html",
40
+ "type": "string",
41
+ "required": true,
42
+ "description": "If `text` is set, this is not required. HTML to use within the each tab panel. If `html` is provided, the `text` argument will be ignored."
43
+ }
44
+ ]
45
+ },
46
+ {
47
+ "name": "classes",
48
+ "type": "string",
49
+ "required": false,
50
+ "description": "Classes to add to the tabs component."
51
+ },
52
+ {
53
+ "name": "attributes",
54
+ "type": "object",
55
+ "required": false,
56
+ "description": "HTML attributes (for example data attributes) to add to the tabs component."
57
+ }
58
+ ]
@@ -1276,16 +1276,18 @@ Tabs.prototype.hidePanel = function (tab) {
1276
1276
 
1277
1277
  Tabs.prototype.unhighlightTab = function ($tab) {
1278
1278
  $tab.setAttribute('aria-selected', 'false');
1279
+ $tab.classList.remove('govuk-tabs__tab--selected');
1279
1280
  $tab.setAttribute('tabindex', '-1');
1280
1281
  };
1281
1282
 
1282
1283
  Tabs.prototype.highlightTab = function ($tab) {
1283
1284
  $tab.setAttribute('aria-selected', 'true');
1285
+ $tab.classList.add('govuk-tabs__tab--selected');
1284
1286
  $tab.setAttribute('tabindex', '0');
1285
1287
  };
1286
1288
 
1287
1289
  Tabs.prototype.getCurrentTab = function () {
1288
- return this.$module.querySelector('[role=tab][aria-selected=true]')
1290
+ return this.$module.querySelector('.govuk-tabs__tab--selected')
1289
1291
  };
1290
1292
 
1291
1293
  // this is because IE doesn't always return the actual value but a relative full path
@@ -12,7 +12,8 @@
12
12
  {% for item in params.items %}
13
13
  {% set id = item.id if item.id else idPrefix + "-" + loop.index %}
14
14
  <li class="govuk-tabs__list-item">
15
- <a class="govuk-tabs__tab" href="#{{ id }}">
15
+ <a class="govuk-tabs__tab{% if loop.index == 1 %} govuk-tabs__tab--selected{% endif %}" href="#{{ id }}"
16
+ {%- for attribute, value in item.attributes %} {{attribute}}="{{value}}"{% endfor %}>
16
17
  {{ item.label }}
17
18
  </a>
18
19
  </li>
@@ -22,7 +23,7 @@
22
23
 
23
24
  {% for item in params.items %}
24
25
  {% set id = item.id if item.id else idPrefix + "-" + loop.index %}
25
- <section class="govuk-tabs__panel" id="{{ id }}">
26
+ <section class="govuk-tabs__panel{% if loop.index > 1 %} govuk-tabs__panel--hidden{% endif %}" id="{{ id }}"{% for attribute, value in item.panel.attributes %} {{attribute}}="{{value}}"{% endfor %}>
26
27
  {{ item.panel.html | safe if item.panel.html else item.panel.text }}
27
28
  </section>
28
29
  {% endfor %}
@@ -0,0 +1,26 @@
1
+ [
2
+ {
3
+ "name": "text",
4
+ "type": "string",
5
+ "required": true,
6
+ "description": "If `html` is set, this is not required. Text to use within the tag component. If `html` is provided, the `text` argument will be ignored."
7
+ },
8
+ {
9
+ "name": "html",
10
+ "type": "string",
11
+ "required": true,
12
+ "description": "If `text` is set, this is not required. HTML to use within the tag component. If `html` is provided, the `text` argument will be ignored."
13
+ },
14
+ {
15
+ "name": "classes",
16
+ "type": "string",
17
+ "required": false,
18
+ "description": "Classes to add to the tag."
19
+ },
20
+ {
21
+ "name": "attributes",
22
+ "type": "object",
23
+ "required": false,
24
+ "description": "HTML attributes (for example data attributes) to add to the tag."
25
+ }
26
+ ]
@@ -11,14 +11,15 @@
11
11
  @include govuk-font($size: 19, $line-height: 1.25);
12
12
  @include govuk-focusable;
13
13
 
14
- -webkit-box-sizing: border-box;
15
-
16
- box-sizing: border-box; // should this be global?
14
+ box-sizing: border-box; // should this be global?
17
15
  display: block;
18
16
  width: 100%;
17
+ min-height: 40px;
19
18
  @include govuk-responsive-margin(6, "bottom");
20
19
  padding: govuk-spacing(1);
21
20
 
21
+ resize: vertical;
22
+
22
23
  border: $govuk-border-width-form-element solid $govuk-input-border-colour;
23
24
  border-radius: 0;
24
25
 
@@ -0,0 +1,65 @@
1
+ [
2
+ {
3
+ "name": "id",
4
+ "type": "string",
5
+ "required": true,
6
+ "description": "The id of the textarea."
7
+ },
8
+ {
9
+ "name": "describedBy",
10
+ "type": "string",
11
+ "required": false,
12
+ "description": "Text or element id to add to the `aria-describedby` attribute to provide description for screenreader users."
13
+ },
14
+ {
15
+ "name": "name",
16
+ "type": "string",
17
+ "required": true,
18
+ "description": "The name of the textarea, which is submitted with the form data."
19
+ },
20
+ {
21
+ "name": "rows",
22
+ "type": "string",
23
+ "required": false,
24
+ "description": "Optional number of textarea rows (default is 5 rows)."
25
+ },
26
+ {
27
+ "name": "value",
28
+ "type": "string",
29
+ "required": false,
30
+ "description": "Optional initial value of the textarea."
31
+ },
32
+ {
33
+ "name": "label",
34
+ "type": "object",
35
+ "required": true,
36
+ "description": "Options for the label component.",
37
+ "isComponent": true
38
+ },
39
+ {
40
+ "name": "hint",
41
+ "type": "object",
42
+ "required": false,
43
+ "description": "Options for the hint component.",
44
+ "isComponent": true
45
+ },
46
+ {
47
+ "name": "errorMessage",
48
+ "type": "object",
49
+ "required": false,
50
+ "description": "Options for the errorMessage component (e.g. text).",
51
+ "isComponent": true
52
+ },
53
+ {
54
+ "name": "classes",
55
+ "type": "string",
56
+ "required": false,
57
+ "description": "Classes to add to the textarea."
58
+ },
59
+ {
60
+ "name": "attributes",
61
+ "type": "object",
62
+ "required": false,
63
+ "description": "HTML attributes (for example data attributes) to add to the textarea."
64
+ }
65
+ ]
@@ -0,0 +1,32 @@
1
+ [
2
+ {
3
+ "name": "text",
4
+ "type": "string",
5
+ "required": true,
6
+ "description": "If `html` is set, this is not required. Text to use within the warning text component. If `html` is provided, the `text` argument will be ignored."
7
+ },
8
+ {
9
+ "name": "html",
10
+ "type": "string",
11
+ "required": true,
12
+ "description": "If `text` is set, this is not required. HTML to use within the warning text component. If `html` is provided, the `text` argument will be ignored."
13
+ },
14
+ {
15
+ "name": "iconFallbackText",
16
+ "type": "string",
17
+ "required": true,
18
+ "description": "The fallback text for the icon."
19
+ },
20
+ {
21
+ "name": "classes",
22
+ "type": "string",
23
+ "required": false,
24
+ "description": "Classes to add to the warning text."
25
+ },
26
+ {
27
+ "name": "attributes",
28
+ "type": "object",
29
+ "required": false,
30
+ "description": "HTML attributes (for example data attributes) to add to the warning text."
31
+ }
32
+ ]
@@ -21,20 +21,7 @@
21
21
  @include govuk-link-style-text;
22
22
  }
23
23
 
24
- // 'No visited state' link mixin
25
- //
26
- // Used in cases where it is not helpful to distinguish between visited and
27
- // non-visited links.
28
- //
29
- // For example, navigation links to pages with dynamic content like admin
30
- // dashboards. The content on the page is changing all the time, so the fact
31
- // that you’ve visited it before is not important.
32
- //
33
- // This is not abstracted as a mixin because it does not provide states for
34
- // all pseudo-selectors so it does not make sense to use it in composition.
35
24
  .govuk-link--no-visited-state {
36
- &:visited {
37
- color: $govuk-link-colour;
38
- }
25
+ @include govuk-link-style-no-visited-state;
39
26
  }
40
27
  }
@@ -20,24 +20,6 @@
20
20
  }
21
21
  }
22
22
 
23
- %govuk-list a {
24
- &:link {
25
- color: $govuk-link-colour;
26
- }
27
-
28
- &:visited {
29
- color: $govuk-link-visited-colour;
30
- }
31
-
32
- &:hover {
33
- color: $govuk-link-hover-colour;
34
- }
35
-
36
- &:active {
37
- color: $govuk-link-active-colour;
38
- }
39
- }
40
-
41
23
  .govuk-list {
42
24
  @extend %govuk-list;
43
25
  }
@@ -86,8 +86,7 @@ $_govuk-grid-widths: (
86
86
  @mixin govuk-grid-column($width: full, $float: left, $at: tablet, $class: "govuk-grid-column") {
87
87
 
88
88
  .#{$class}-#{$width} {
89
- -webkit-box-sizing: border-box;
90
- box-sizing: border-box;
89
+ box-sizing: border-box;
91
90
  @if $at != desktop {
92
91
  width: 100%;
93
92
  }
@@ -44,6 +44,12 @@
44
44
  &:active {
45
45
  color: $govuk-link-active-colour;
46
46
  }
47
+
48
+ // When focussed, the text colour needs to be darker to ensure that colour
49
+ // contrast is still acceptable
50
+ &:focus {
51
+ color: $govuk-focus-text-colour;
52
+ }
47
53
  }
48
54
 
49
55
  /// Muted style link mixin
@@ -73,7 +79,7 @@
73
79
  // When focussed, the text colour needs to be darker to ensure that colour
74
80
  // contrast is still acceptable
75
81
  &:focus {
76
- color: $govuk-text-colour;
82
+ color: $govuk-focus-text-colour;
77
83
  }
78
84
 
79
85
  // alphagov/govuk_template includes a specific a:link:focus selector designed
@@ -122,6 +128,51 @@
122
128
  }
123
129
  }
124
130
 
131
+
132
+ /// No visited state link mixin
133
+ ///
134
+ /// Used in cases where it is not helpful to distinguish between visited and
135
+ /// non-visited links.
136
+ ///
137
+ /// For example, navigation links to pages with dynamic content like admin
138
+ /// dashboards. The content on the page is changing all the time, so the fact
139
+ /// that you’ve visited it before is not important.
140
+ ///
141
+ /// If you use this mixin in a component you must also include the
142
+ /// govuk-link-common mixin in order to get the focus state.
143
+ ///
144
+ /// @example scss
145
+ /// .govuk-component__link {
146
+ /// @include govuk-link-common;
147
+ /// @include govuk-link-style-no-visited-state;
148
+ /// }
149
+ ///
150
+ /// @access public
151
+
152
+ @mixin govuk-link-style-no-visited-state {
153
+ &:link {
154
+ color: $govuk-link-colour;
155
+ }
156
+
157
+ &:visited {
158
+ color: $govuk-link-colour;
159
+ }
160
+
161
+ &:hover {
162
+ color: $govuk-link-hover-colour;
163
+ }
164
+
165
+ &:active {
166
+ color: $govuk-link-active-colour;
167
+ }
168
+
169
+ // When focussed, the text colour needs to be darker to ensure that colour
170
+ // contrast is still acceptable
171
+ &:focus {
172
+ color: $govuk-focus-text-colour;
173
+ }
174
+ }
175
+
125
176
  /// Print friendly link mixin
126
177
  ///
127
178
  /// When printing, append the the destination URL to the link text, as long