mirror of
https://github.com/material-components/material-web.git
synced 2026-01-09 07:21:09 +08:00
Fixed Button and Icon Button disability UI in fieldset.
This commit is contained in:
parent
df6923e85c
commit
41546c3da1
@ -20,7 +20,7 @@ $_md-sys-motion: tokens.md-sys-motion-values();
|
||||
transition-timing-function: map.get($_md-sys-motion, 'emphasized-easing');
|
||||
}
|
||||
|
||||
:host([disabled]) md-elevation {
|
||||
:host(:disabled) md-elevation {
|
||||
transition: none;
|
||||
}
|
||||
|
||||
@ -59,7 +59,7 @@ $_md-sys-motion: tokens.md-sys-motion-values();
|
||||
);
|
||||
}
|
||||
|
||||
:host([disabled]) md-elevation {
|
||||
:host(:disabled) md-elevation {
|
||||
@include elevation.theme(
|
||||
(
|
||||
'level': var(--_disabled-container-elevation),
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
color: var(--_pressed-icon-color);
|
||||
}
|
||||
|
||||
:host([disabled]) ::slotted([slot='icon']) {
|
||||
:host(:disabled) ::slotted([slot='icon']) {
|
||||
color: var(--_disabled-icon-color);
|
||||
opacity: var(--_disabled-icon-opacity);
|
||||
}
|
||||
|
||||
@ -57,20 +57,20 @@
|
||||
border-color: var(--_pressed-outline-color);
|
||||
}
|
||||
|
||||
:host([disabled]) .outline {
|
||||
:host(:disabled) .outline {
|
||||
border-color: var(--_disabled-outline-color);
|
||||
opacity: var(--_disabled-outline-opacity);
|
||||
}
|
||||
|
||||
@media (forced-colors: active) {
|
||||
:host([disabled]) .background {
|
||||
:host(:disabled) .background {
|
||||
// Only outlined buttons change their border when disabled to distinguish
|
||||
// them from other buttons that add a border for increased visibility in
|
||||
// HCM.
|
||||
border-color: GrayText;
|
||||
}
|
||||
|
||||
:host([disabled]) .outline {
|
||||
:host(:disabled) .outline {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@ -71,7 +71,7 @@
|
||||
);
|
||||
}
|
||||
|
||||
:host([disabled]) {
|
||||
:host(:disabled) {
|
||||
cursor: default;
|
||||
pointer-events: none;
|
||||
}
|
||||
@ -139,12 +139,12 @@
|
||||
text-overflow: inherit;
|
||||
}
|
||||
|
||||
:host([disabled]) .label {
|
||||
:host(:disabled) .label {
|
||||
color: var(--_disabled-label-text-color);
|
||||
opacity: var(--_disabled-label-text-opacity);
|
||||
}
|
||||
|
||||
:host([disabled]) .background {
|
||||
:host(:disabled) .background {
|
||||
background-color: var(--_disabled-container-color);
|
||||
opacity: var(--_disabled-container-opacity);
|
||||
}
|
||||
@ -157,7 +157,7 @@
|
||||
border: 1px solid CanvasText;
|
||||
}
|
||||
|
||||
:host([disabled]) {
|
||||
:host(:disabled) {
|
||||
--_disabled-icon-color: GrayText;
|
||||
--_disabled-icon-opacity: 1;
|
||||
--_disabled-container-opacity: 1;
|
||||
|
||||
@ -79,7 +79,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
.outlined:disabled .icon {
|
||||
:host(:disabled) .outlined .icon {
|
||||
opacity: var(--_disabled-icon-opacity);
|
||||
}
|
||||
|
||||
@ -139,7 +139,7 @@
|
||||
}
|
||||
|
||||
@media (forced-colors: active) {
|
||||
:host([disabled]) {
|
||||
:host(:disabled) {
|
||||
--_disabled-outline-opacity: 1;
|
||||
}
|
||||
|
||||
|
||||
@ -41,7 +41,7 @@
|
||||
);
|
||||
}
|
||||
|
||||
:host([disabled]) {
|
||||
:host(:disabled) {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
@ -109,7 +109,7 @@
|
||||
}
|
||||
|
||||
@media (forced-colors: active) {
|
||||
:host([disabled]) {
|
||||
:host(:disabled) {
|
||||
--_disabled-icon-opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user