Skip to content

Commit e17279f

Browse files
committed
Update input hover and add reverse and target hover, apply to pagination and task list
1 parent d49bb29 commit e17279f

3 files changed

Lines changed: 28 additions & 3 deletions

File tree

packages/nhsuk-frontend/src/nhsuk/components/pagination/_index.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@
167167
@include nhsuk-font-size(19);
168168

169169
&:not(:focus):hover {
170-
background-color: nhsuk-colour("grey-4");
170+
background-color: $nhsuk-target-hover-colour;
171171
}
172172
}
173173

packages/nhsuk-frontend/src/nhsuk/components/task-list/_index.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
// NHS pages have a grey background, so we need a slightly darker colour for the hover
1414
// This produces 1.1:1 contrast, the same as GOV.UK’s
15-
$nhsuk-task-list-hover-colour: nhsuk-colour-compatible(color.adjust(nhsuk-colour("grey-5"), $lightness: -6%));
15+
$nhsuk-task-list-hover-colour: $nhsuk-target-hover-colour;
1616

1717
// @deprecated To be removed in v11.0
1818
$nhsuk-task-list-hover-color: $nhsuk-task-list-hover-colour;

packages/nhsuk-frontend/src/nhsuk/core/settings/_colours-applied.scss

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,32 @@ $nhsuk-input-border-colour: nhsuk-colour("grey-1") !default;
141141
///
142142
/// @type Colour
143143

144-
$nhsuk-hover-colour: nhsuk-colour("grey-3") !default;
144+
$nhsuk-hover-colour: rgba(nhsuk-colour("grey-3"), 0.5) !default;
145+
146+
/// Reverse input hover colour
147+
///
148+
/// Used for hover states on form controls, on reverse backgrounds
149+
///
150+
/// @type Colour
151+
152+
$nhsuk-reverse-hover-colour: nhsuk-shade($nhsuk-brand-colour, 20%) !default;
153+
154+
/// Target area hover colour
155+
///
156+
/// Used for hover states on transparent areas used to expand target areas
157+
///
158+
/// @type Colour
159+
160+
$nhsuk-target-hover-colour: rgba(nhsuk-colour("grey-3"), 0.25) !default;
161+
162+
/// Reverse target area hover colour
163+
///
164+
/// Used for hover states on transparent areas used to expand target areas,
165+
/// on reverse backgrounds
166+
///
167+
/// @type Colour
168+
169+
$nhsuk-reverse-target-hover-colour: nhsuk-shade($nhsuk-brand-colour, 20%) !default;
145170

146171
/// Form element background colour
147172
///

0 commit comments

Comments
 (0)