mirror of
https://github.com/material-components/material-web.git
synced 2026-01-09 07:21:09 +08:00
feat(button): add gradient support to container colors
This feature works by using the `background` shorthand instead of `background-color`. This property supports both CSS `<color>` and `<gradient>` types. PiperOrigin-RevId: 751080245
This commit is contained in:
parent
169023da85
commit
5bc15069d1
@ -122,7 +122,7 @@
|
||||
|
||||
.background {
|
||||
// Background color. Separate node for disabled opacity styles.
|
||||
background-color: var(--_container-color);
|
||||
background: var(--_container-color);
|
||||
border-radius: inherit;
|
||||
inset: 0;
|
||||
position: absolute;
|
||||
@ -145,7 +145,7 @@
|
||||
}
|
||||
|
||||
:host(:is([disabled], [soft-disabled])) .background {
|
||||
background-color: var(--_disabled-container-color);
|
||||
background: var(--_disabled-container-color);
|
||||
opacity: var(--_disabled-container-opacity);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user