Topic: Restoring hover and focus states for a custom dark button

byteRunner42 free asked 2 weeks ago


A legacy dark action button retains its base color through our override, but hover and focus styles disappeared after the theme migration.

Which variables control these states?


Arkadiusz Idzikowski staff answered 2 weeks ago


Check the computed styles for the button's base, hover, focus, and disabled states separately. A background override can conceal the base theme color while leaving the other states dependent on missing CSS rules.

Try the documented btn-dark class without your overrides to establish a working baseline. If you need a separate custom variant, please send its selector, stylesheet import order, and computed button variables. We can then identify which values need to be supplied for the interaction states as well as the base style.

https://mdbootstrap.com/docs/angular/components/buttons/


byteRunner42 free commented 2 weeks ago

I tried btn-dark without our custom background rule, and the hover and focus states are back. That neutral color is suitable for this screen, so I removed the override rather than maintaining another variant. Keyboard focus is visible again too.



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: MDB5 9.1.0
  • Device: Laptop
  • Browser: Firefox
  • OS: macOS
  • Provided sample code: No
  • Provided link: No