|
10 | 10 | /// @link https://github.com/alphagov/govuk-frontend Original code taken from GDS (Government Digital Service) |
11 | 11 | //// |
12 | 12 |
|
13 | | -// NHS pages have a grey background, so we need a slightly darker colour for the hover |
14 | | -// 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%)); |
| 13 | +$nhsuk-task-list-hover-colour: $nhsuk-target-hover-colour; |
| 14 | +$nhsuk-task-list-hover-border-colour: nhsuk-colour("grey-3"); |
16 | 15 |
|
17 | 16 | // @deprecated To be removed in v11.0 |
18 | 17 | $nhsuk-task-list-hover-color: $nhsuk-task-list-hover-colour; |
@@ -42,20 +41,28 @@ $nhsuk-task-list-hover-color: $nhsuk-task-list-hover-colour; |
42 | 41 | padding-top: nhsuk-spacing(2) + 4px; |
43 | 42 | padding-bottom: nhsuk-spacing(2) + 4px; |
44 | 43 |
|
45 | | - border-bottom: 1px solid $nhsuk-border-colour; |
| 44 | + border: 1px solid $nhsuk-border-colour; |
| 45 | + border-width: 0 0 1px; |
46 | 46 | } |
47 | 47 |
|
48 | 48 | .nhsuk-task-list__item:first-child { |
49 | | - border-top: 1px solid $nhsuk-border-colour; |
| 49 | + border-top-width: 1px; |
50 | 50 | } |
51 | 51 |
|
52 | 52 | // This class is added to the <li> elements where the task name is a link. |
53 | 53 | // The background hover colour is added to help indicate that the whole row is clickable, rather |
54 | 54 | // than just the visible link text. |
55 | 55 | .nhsuk-task-list__item--with-link:hover { |
| 56 | + margin-top: -1px; |
| 57 | + border-width: 1px 0; |
| 58 | + border-color: $nhsuk-task-list-hover-border-colour; |
56 | 59 | background: $nhsuk-task-list-hover-colour; |
57 | 60 | } |
58 | 61 |
|
| 62 | + .nhsuk-task-list__item--with-link:first-child:hover { |
| 63 | + margin-top: 0; |
| 64 | + } |
| 65 | + |
59 | 66 | .nhsuk-task-list__name-and-hint { |
60 | 67 | display: table-cell; |
61 | 68 | color: $nhsuk-text-colour; |
|
0 commit comments