Skip to content

Commit 3c9437a

Browse files
asyncLizcopybara-github
authored andcommitted
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: 635264320
1 parent 169023d commit 3c9437a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

button/internal/_shared.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122

123123
.background {
124124
// Background color. Separate node for disabled opacity styles.
125-
background-color: var(--_container-color);
125+
background: var(--_container-color);
126126
border-radius: inherit;
127127
inset: 0;
128128
position: absolute;
@@ -145,7 +145,7 @@
145145
}
146146

147147
:host(:is([disabled], [soft-disabled])) .background {
148-
background-color: var(--_disabled-container-color);
148+
background: var(--_disabled-container-color);
149149
opacity: var(--_disabled-container-opacity);
150150
}
151151

0 commit comments

Comments
 (0)