nhsuk-frontend icon indicating copy to clipboard operation
nhsuk-frontend copied to clipboard

a.nhsuk-button.nhsuk-button--reverse:visited text is invisible!

Open adam-carruthers opened this issue 2 years ago • 1 comments

Bug Report

What is the issue?

Using the nhsuk CSS, if you have a button with

What steps are required to reproduce the issue?

If you have a button like this

<a class="nhsuk-button nhsuk-button--reverse BasePage_logoutButton__rc_BE" role="button" aria-disabled="false" draggable="false" href="https://www.google.com">I'm a button</a>

the CSS is such that the button is invisible when the link is visited. This is because the .nhsuk-button:visisted CSS is defined, and sets the text color to white, but the .nhs-button--reverse class sets the background color to white as well.

How it looks when the link is visited (no hover):

image

It should look like:

image

The fix to this issue would be to add a .nhs-button--reverse:visited class to the CSS to cover this edge case.

What was the environment where this issue occurred?

  • Device: Thinkpad
  • Operating System: Windows
  • Browser: Chrome
  • Browser version: 109.0.5414.120 (Official Build) (64-bit)
  • NHS.UK frontend package version: 6.2.0
  • Node version:
  • npm version:

Is there anything else you think would be useful in recreating the issue?

adam-carruthers avatar Jan 31 '23 14:01 adam-carruthers

@talieScript is going to fix this

mikemonteith avatar Sep 22 '23 11:09 mikemonteith

Cannot recreate, seems to have been fixed.

Image

anandamaryon1 avatar Apr 30 '25 09:04 anandamaryon1