frontend icon indicating copy to clipboard operation
frontend copied to clipboard

Remove gauge card transparency on focus

Open karwosts opened this issue 2 years ago • 3 comments

Proposed change

Gauge card currently turns transparent when focused. None of the other main card types exhibit this behavior. Remove this property from the css. It's not easy to notice against the default dark background, but when set against a different background it's pretty obvious.

gauge-transparent

Type of change

  • [ ] Dependency upgrade
  • [x] Bugfix (non-breaking change which fixes an issue)
  • [ ] New feature (thank you!)
  • [ ] Breaking change (fix/feature causing existing functionality to break)
  • [ ] Code quality improvements to existing code or addition of tests

Example configuration


Additional information

  • This PR fixes or closes issue: fixes #12914
  • This PR is related to issue or discussion:
  • Link to documentation pull request:

Checklist

  • [x] The code change is tested and works locally.
  • [x] There is no commented out code in this PR.
  • [ ] Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

karwosts avatar Dec 14 '22 19:12 karwosts

Can you have a look at the button card as well, since I see the same CSS there in the coding => probably also should get removed.

spacegaier avatar Dec 14 '22 22:12 spacegaier

I also removed the ha-card:focus from the button card, though that one is more subtle, since it does not modify the background color. All it does is set "outline: none", but the card don't seem to have an outline anyway, so I can't visually see that it does anything.

Removed it just for consistency/cleanup.

karwosts avatar Dec 14 '22 23:12 karwosts

I put back outline none, so now this only removes the background color on focus, which makes gauge card consisistent with all the other display-type cards (cards which are non-interactive, except to click it brings up "more info" for the target entity").

If there is desire to have all cards change color when focused, I think that might make sense as a new PR after more discussion with the UI team?

karwosts avatar Dec 15 '22 20:12 karwosts

Going to merge this, we should add some indication for focus in a follow up PR

bramkragten avatar Jan 23 '23 19:01 bramkragten