From e92687cd2eb5192586182b1940b343bc6bcdb8c0 Mon Sep 17 00:00:00 2001 From: Oliver Byford Date: Fri, 9 Jul 2021 10:07:26 +0100 Subject: [PATCH 1/2] Fix focus state for links containing inline code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Inheriting the background from the link means that the code block ends up with its own yellow background, which then clips the box-shadow used to give the focused link a black underline. Rather than inherit the yellow background, set the background to transparent. The focused link still has its own yellow background which can be seen ‘through’ the transparent code element. --- lib/assets/stylesheets/modules/_technical-documentation.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/assets/stylesheets/modules/_technical-documentation.scss b/lib/assets/stylesheets/modules/_technical-documentation.scss index d5dff2c5..cb3a57a7 100644 --- a/lib/assets/stylesheets/modules/_technical-documentation.scss +++ b/lib/assets/stylesheets/modules/_technical-documentation.scss @@ -185,7 +185,7 @@ } a:focus code { - background: inherit; + background: transparent; color: inherit; } From 220444ed0b843e921c9e47ffcaf1e55938277fb4 Mon Sep 17 00:00:00 2001 From: Oliver Byford Date: Mon, 19 Jul 2021 11:19:56 +0100 Subject: [PATCH 2/2] Document in CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 39976756..592fb740 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - [#238: Move the aria-expanded attribute to the correct element](https://github.com/alphagov/tech-docs-gem/pull/238) - [#240: Update menu html structure so it's one single hierarchical list](https://github.com/alphagov/tech-docs-gem/pull/240) - [#244: Don't change the focus of the page on initial load](https://github.com/alphagov/tech-docs-gem/pull/244) +- [#243: Fix focus state for links containing inline code](https://github.com/alphagov/tech-docs-gem/pull/243) ## 2.3.0