[component] changed 'disabled' button's state

This commit is contained in:
Maxim Kadushkin 2019-10-15 14:04:54 +03:00
parent da37e8cde3
commit 6c88d171f6
2 changed files with 8 additions and 9 deletions

View file

@ -98,9 +98,11 @@
.button-otherstates-icon(@icon-class, @icon-size) { .button-otherstates-icon(@icon-class, @icon-size) {
button.over > .@{icon-class} {background-position-x: -1*@icon-size; --bgX: -(1*@icon-size);} button.over > .@{icon-class} {background-position-x: -1*@icon-size; --bgX: -(1*@icon-size);}
button.active > .@{icon-class}, button {
button:active > .@{icon-class} {background-position-x: -2*@icon-size !important; --bgX: -(2*@icon-size);} &.active, &:active {
button.disabled > .@{icon-class} {background-position-x: -3*@icon-size !important; --bgX: -(3*@icon-size);} &:not(.disabled):not(:disabled) > .@{icon-class} {background-position-x: -2*@icon-size !important; --bgX: -(2*@icon-size);}
}
}
} }
.mx-button-otherstates-icon2(@icon-size) { .mx-button-otherstates-icon2(@icon-size) {
@ -109,7 +111,6 @@
.icon {background-position-x: -1*@icon-size; --bgX: -(1*@icon-size);} .icon {background-position-x: -1*@icon-size; --bgX: -(1*@icon-size);}
} }
} }
&.disabled {.icon {opacity: .4;}}
} }
.button-otherstates-icon2(@icon-class, @icon-size) { .button-otherstates-icon2(@icon-class, @icon-size) {

View file

@ -1,4 +1,5 @@
@x-huge-btn-height: 46px; @x-huge-btn-height: 46px;
@btn-disabled-opacity: .4;
.btn { .btn {
border-radius: 1px; border-radius: 1px;
@ -31,10 +32,7 @@
} }
&[disabled] { &[disabled] {
opacity: 1; opacity: @btn-disabled-opacity;
.caption {
opacity: 0.65;
}
} }
&:focus { &:focus {
@ -315,7 +313,7 @@
&[disabled], &[disabled],
&.disabled { &.disabled {
color: #000; color: #000;
opacity: 1; opacity: @btn-disabled-opacity;
} }
} }