govuk_publishing_components 25.2.0 → 25.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 30b1c979671a113e33ce87e4db1b19cbd0b26d2c64a6f1f4a98da31c24ac6294
4
- data.tar.gz: 8c1a5fa5e9d9fa2f78adb033a0409deb8a6da43f6149b8b6f2f041b4cc859809
3
+ metadata.gz: 0fc516835586ed0098df4390f5fd9bfe2c9dd97c9dcd91d0d41c2cc0b8ad9864
4
+ data.tar.gz: 4a4e410ac48855b9ba8d7c7f014c37b4049587824cf147daa51b2b9c35870dd2
5
5
  SHA512:
6
- metadata.gz: 591e1edddd512c62aa2c7948b7e901c23842f06fc518ef1e2b24277af9ac933044d274f353d1e0d1ad8bb5e8b0ce92fe33989e059cf77288c9aaec86f7d19e47
7
- data.tar.gz: 891a548c447d50c57b464ff8244b75f8f069655555f45b71568708350b608dc606f1956de61fc67542856c6e1087e1eb5dcd66dacb60179350f9483efc6c52c2
6
+ metadata.gz: e5ba63ec97ec65250980ba70482fbdb1efa191c203cb693a5c76b054480edb63562b68d955bb22b06364dc447071b1f2642784a732c73098c604282bebe882c0
7
+ data.tar.gz: 12c1d8b7dc34e97e9faf28b58d5cff71f23ab86eb79b0faf567ea23f89f2043a805f8b9de57f46a04fd4ea8d87c3f8f4364dabaf3d0d4b849ac81badf1767d0f
@@ -1,15 +1,15 @@
1
1
  $search-icon-size: 20px;
2
2
 
3
3
  @mixin chevron($colour) {
4
- border-bottom: .2rem solid govuk-colour($colour);
5
- border-right: .2rem solid govuk-colour($colour);
4
+ border-bottom: 3px solid govuk-colour($colour);
5
+ border-right: 3px solid govuk-colour($colour);
6
6
  content: " ";
7
7
  display: inline-block;
8
- height: .5rem;
9
- margin: 0 .5em 0 .15em;
8
+ height: 8px;
9
+ margin: 0 8px 0 2px;
10
10
  transform: translateY(-35%) rotate(45deg);
11
11
  vertical-align: middle;
12
- width: .5rem;
12
+ width: 8px;
13
13
  }
14
14
 
15
15
  %top-level-navigation-link-base {
@@ -24,8 +24,9 @@ $search-icon-size: 20px;
24
24
  text-decoration: none;
25
25
 
26
26
  &,
27
+ &:link,
27
28
  &:visited {
28
- color: govuk-colour("blue"); // FIXME: contrast against govuk-colour("light-grey") not high enough
29
+ color: $govuk-link-colour;
29
30
  }
30
31
 
31
32
  &:focus {
@@ -44,6 +45,7 @@ $search-icon-size: 20px;
44
45
 
45
46
  @include govuk-media-query($from: "desktop") {
46
47
  @include govuk-font($size: 16, $weight: false, $line-height: 20px);
48
+ color: govuk-colour("white");
47
49
  display: inherit;
48
50
  height: govuk-spacing(9);
49
51
  padding: govuk-spacing(4);
@@ -107,10 +109,6 @@ $search-icon-size: 20px;
107
109
  border-color: $govuk-focus-colour;
108
110
  }
109
111
 
110
- &:hover {
111
- border-color: govuk-colour("black");
112
- }
113
-
114
112
  &.gem-c-layout-super-navigation-header__open-button {
115
113
  border-left-color: govuk-colour("black");
116
114
  border-right-color: govuk-colour("black");
@@ -128,8 +126,8 @@ $search-icon-size: 20px;
128
126
 
129
127
  &:before,
130
128
  &:after {
131
- $width: 1.2rem;
132
- $height: .2rem;
129
+ $width: govuk-spacing(4);
130
+ $height: 4px;
133
131
 
134
132
  border: none;
135
133
  content: " ";
@@ -265,6 +263,30 @@ $search-icon-size: 20px;
265
263
  .gem-c-layout-super-navigation-header__navigation-item-link {
266
264
  @extend %top-level-navigation-link-base;
267
265
 
266
+ &,
267
+ &:link, // 👈 required to override govuk-template
268
+ &:visited {
269
+ color: $govuk-link-colour;
270
+
271
+ &:hover {
272
+ color: govuk-colour("mid-grey");
273
+ }
274
+
275
+ &:focus {
276
+ color: $govuk-focus-text-colour;
277
+ }
278
+
279
+ @include govuk-media-query($from: "desktop") {
280
+ color: govuk-colour("white");
281
+ }
282
+ }
283
+
284
+ // This :link:focus selector is required to override the `govuk-template`
285
+ // defaults.
286
+ &:link:focus {
287
+ color: $govuk-focus-text-colour;
288
+ }
289
+
268
290
  .js-enabled & {
269
291
  @include govuk-media-query($until: "desktop") {
270
292
  padding: govuk-spacing(6) govuk-spacing(3) govuk-spacing(6) govuk-spacing(9);
@@ -366,6 +388,10 @@ $search-icon-size: 20px;
366
388
  position: absolute;
367
389
  right: (0 - govuk-spacing(3));
368
390
 
391
+ &:hover {
392
+ border-color: govuk-colour("black");
393
+ }
394
+
369
395
  @include govuk-media-query($from: 360px) {
370
396
  right: 0;
371
397
  }
@@ -134,7 +134,17 @@ show_navigation_menu_text = t("components.layout_super_navigation_header.menu_to
134
134
  link_classes << "gem-c-layout-super-navigation-header__navigation-second-item-link--with-description" if has_description
135
135
  %>
136
136
  <li class="gem-c-layout-super-navigation-header__dropdown-list-item">
137
- <%= link_to item[:label], item[:href], { class: link_classes } %>
137
+ <%= link_to item[:label], item[:href], {
138
+ class: link_classes,
139
+ data: {
140
+ module: "gem-track-click",
141
+ track_action: "#{tracking_label}Link",
142
+ track_category: "headerClicked",
143
+ track_label: item[:href],
144
+ track_dimension: item[:label],
145
+ track_dimension_index: "29",
146
+ }
147
+ } %>
138
148
  <%= tag.p item[:description], class: "govuk-body govuk-!-margin-0" if has_description %>
139
149
  </li>
140
150
  <% end %>
@@ -150,9 +160,20 @@ show_navigation_menu_text = t("components.layout_super_navigation_header.menu_to
150
160
  <ul class="gem-c-layout-super-navigation-header__navigation-second-footer-list">
151
161
  <% link[:footer_links].each do | item | %>
152
162
  <li class="gem-c-layout-super-navigation-header__navigation-second-footer-item">
153
- <a class="govuk-link gem-c-layout-super-navigation-header__navigation-second-footer-link" href="<%= item[:href] %>">
154
- <%= item[:label] %>
155
- </a>
163
+ <%= link_to item[:label], item[:href], {
164
+ class: [
165
+ "govuk-link",
166
+ "gem-c-layout-super-navigation-header__navigation-second-footer-link",
167
+ ],
168
+ data: {
169
+ module: "gem-track-lick",
170
+ track_action: "#{tracking_label}Link",
171
+ track_cateogry: "headerClicked",
172
+ track_label: item[:href],
173
+ track_dimension: item[:label],
174
+ track_dimension_index: "29",
175
+ }
176
+ } %>
156
177
  </li>
157
178
  <% end %>
158
179
  </ul>
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "25.2.0".freeze
2
+ VERSION = "25.2.1".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_publishing_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 25.2.0
4
+ version: 25.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev