Skip to content
This repository has been archived by the owner on Sep 26, 2022. It is now read-only.

Is it possible to override hover highlight/color for buttons? #182

Open
atsepkov opened this issue Mar 19, 2021 · 2 comments
Open

Is it possible to override hover highlight/color for buttons? #182

atsepkov opened this issue Mar 19, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@atsepkov
Copy link

The default button highlight state during hover seems too subtle to me (and not easy to notice on some monitors). When I inspected the element, I found the following CSS rule responsible for the highlight:

.s-btn:not(.disabled):hover::before {
    opacity: 0.08;
}

Is it possible to override this with a custom opacity and/or color in my _material-theme.scss file?

@Florian-Schoenherr
Copy link
Collaborator

We have some ideas on more customizable theming. Right now, the hover seems to follow specs.
I would like it to be more like this: https://material-ui.com/components/buttons/ (also try tabbing on it, provides ripple-focus styling)

@Florian-Schoenherr Florian-Schoenherr added the enhancement New feature or request label Mar 19, 2021
@atsepkov
Copy link
Author

atsepkov commented Mar 19, 2021

In the link you mention, the buttons seem to be using black background (rather than white) for the :before element that overlays the button, which indeed doesn't have the same "too subtle" problem. Github buttons seem to be using a darkening effect too, which is easier to see. Maybe just changing this lib to also use black background as well for the :before element would be enough for now?

As an experiment, I added the following to the global.css and the hover style does indeed seem more noticeable:

.s-btn:not(.disabled):hover::before {
    background: black;
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants