mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-21 04:50:14 +08:00
refactor(button): remove redundant style codes
This commit is contained in:
parent
259d2350b5
commit
e31ae14823
@ -81,12 +81,12 @@
|
|||||||
@mixin button-icon-mixin($color) {
|
@mixin button-icon-mixin($color) {
|
||||||
@include e(icon) {
|
@include e(icon) {
|
||||||
@include b(icon) {
|
@include b(icon) {
|
||||||
fill: $color !important;
|
fill: $color;
|
||||||
stroke: $color !important;
|
stroke: $color;
|
||||||
}
|
}
|
||||||
@include b(base-loading) {
|
@include b(base-loading) {
|
||||||
fill: $color !important;
|
fill: $color;
|
||||||
stroke: $color !important;
|
stroke: $color;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -184,29 +184,25 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
@include m(text) {
|
@include m(text) {
|
||||||
@include button-icon-mixin(map-get($--button-ghost-typed-text-color, $type));
|
|
||||||
color: map-get($--button-text-typed-text-color, $type);
|
color: map-get($--button-text-typed-text-color, $type);
|
||||||
|
@include button-icon-mixin(map-get($--button-ghost-typed-text-color, $type));
|
||||||
@include not-m(disabled) {
|
@include not-m(disabled) {
|
||||||
@include m(enter-pressed) {
|
@include m(enter-pressed) {
|
||||||
background-color: transparent;
|
|
||||||
color: map-get($--button-text-typed-text-color, $type + '-active');
|
color: map-get($--button-text-typed-text-color, $type + '-active');
|
||||||
@include button-icon-mixin(map-get($--button-ghost-typed-text-color, $type + '-active'));
|
@include button-icon-mixin(map-get($--button-ghost-typed-text-color, $type + '-active'));
|
||||||
}
|
}
|
||||||
&:not(:active):focus {
|
&:not(:active):focus {
|
||||||
@include not-m(enter-pressed) {
|
@include not-m(enter-pressed) {
|
||||||
background-color: transparent;
|
|
||||||
color: map-get($--button-text-typed-text-color, $type + '-focus');
|
color: map-get($--button-text-typed-text-color, $type + '-focus');
|
||||||
@include button-icon-mixin(map-get($--button-ghost-typed-text-color, $type + '-focus'));
|
@include button-icon-mixin(map-get($--button-ghost-typed-text-color, $type + '-focus'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@include not-m(enter-pressed) {
|
@include not-m(enter-pressed) {
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: transparent;
|
|
||||||
color: map-get($--button-text-typed-text-color, $type + '-hover');
|
color: map-get($--button-text-typed-text-color, $type + '-hover');
|
||||||
@include button-icon-mixin(map-get($--button-ghost-typed-text-color, $type + '-hover'));
|
@include button-icon-mixin(map-get($--button-ghost-typed-text-color, $type + '-hover'));
|
||||||
}
|
}
|
||||||
&:active {
|
&:active {
|
||||||
background-color: transparent;
|
|
||||||
color: map-get($--button-text-typed-text-color, $type + '-active');
|
color: map-get($--button-text-typed-text-color, $type + '-active');
|
||||||
@include button-icon-mixin(map-get($--button-ghost-typed-text-color, $type + '-active'));
|
@include button-icon-mixin(map-get($--button-ghost-typed-text-color, $type + '-active'));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user