fix: button dark hover,active

This commit is contained in:
ycjcl868 2019-12-31 10:24:26 +08:00
parent f230ac58d6
commit 0903e3924c

View File

@ -281,15 +281,33 @@
.button-color(@error-color, @btn-default-bg, @error-color); .button-color(@error-color, @btn-default-bg, @error-color);
&:hover, &:hover,
&:focus { &:focus {
.button-color( & when (@theme = dark) {
~`colorPalette('@{error-color}', 5) `; @btn-default-bg; ~`colorPalette('@{error-color}', 5) ` .button-color(
); ~`colorPalette('@{error-color}', 7) `; @btn-default-bg; ~`colorPalette('@{error-color}', 7)
`
);
}
& when not (@theme = dark) {
.button-color(
~`colorPalette('@{error-color}', 5) `; @btn-default-bg; ~`colorPalette('@{error-color}', 5)
`
);
}
} }
&:active, &:active,
&.active { &.active {
.button-color( & when (@theme = dark) {
~`colorPalette('@{error-color}', 7) `; @btn-default-bg; ~`colorPalette('@{error-color}', 7) ` .button-color(
); ~`colorPalette('@{error-color}', 5) `; @btn-default-bg; ~`colorPalette('@{error-color}', 5)
`
);
}
& when not (@theme = dark) {
.button-color(
~`colorPalette('@{error-color}', 7) `; @btn-default-bg; ~`colorPalette('@{error-color}', 7)
`
);
}
} }
.button-disabled(); .button-disabled();
} }
@ -299,10 +317,20 @@
box-shadow: none; box-shadow: none;
&:hover, &:hover,
&:focus { &:focus {
.button-color(~`colorPalette('@{error-color}', 5) `; transparent; transparent); & when (@theme = dark) {
.button-color(~`colorPalette('@{error-color}', 7) `; transparent; transparent);
}
& when not (@theme = dark) {
.button-color(~`colorPalette('@{error-color}', 5) `; transparent; transparent);
}
} }
&:active { &:active {
.button-color(~`colorPalette('@{error-color}', 7) `; transparent; transparent); & when (@theme = dark) {
.button-color(~`colorPalette('@{error-color}', 5) `; transparent; transparent);
}
& when not (@theme = dark) {
.button-color(~`colorPalette('@{error-color}', 7) `; transparent; transparent);
}
} }
.button-disabled(@disabled-color; transparent; transparent); .button-disabled(@disabled-color; transparent; transparent);
} }