Skip to content

Commit

Permalink
Add an outline to hovered full click cards
Browse files Browse the repository at this point in the history
  • Loading branch information
ahosgood committed Sep 13, 2024
1 parent 554c3cf commit 703050a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Add the option for a darker `<hr>` element with `tna-hr-dark`
- Added the option for a darker `<hr>` element with `tna-hr-dark`
- Tables needing horizontal scrolling can be focused on and recieve a "(scroll to see more)" note added to their caption

### Changed

- Added an outline to focused cards with the full click option enabled
- Added outlines to hovered and focused cards with the full click option enabled
- `touched`, `tabbed` and `clicked` template modifiers added as part of `initAll()`
- Print modifiers moved into `initAll()`

Expand Down
15 changes: 15 additions & 0 deletions src/nationalarchives/components/card/card.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@use "sass:math";
@use "../../variables/a11y" as a11yVariables;
@use "../../variables/borders";
@use "../../tools/a11y";
@use "../../tools/colour";
Expand Down Expand Up @@ -80,6 +81,20 @@
order: 2;
}

&--full-click {
border-radius: 0.1px;

&:hover {
@include colour.colour-outline("keyline", 1px, solid);
outline-offset: a11yVariables.$focus-outline-width - 1px;
}

&:focus,
&:active {
outline: none;
}
}

&--full-click &__heading-link {
&::before {
content: "";
Expand Down

0 comments on commit 703050a

Please sign in to comment.