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);
&:hover,
&:focus {
.button-color(
~`colorPalette('@{error-color}', 5) `; @btn-default-bg; ~`colorPalette('@{error-color}', 5) `
);
& when (@theme = dark) {
.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 {
.button-color(
~`colorPalette('@{error-color}', 7) `; @btn-default-bg; ~`colorPalette('@{error-color}', 7) `
);
& when (@theme = dark) {
.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();
}
@ -299,10 +317,20 @@
box-shadow: none;
&:hover,
&: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 {
.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);
}