Skip to content

Commit

Permalink
fix(Button): fix dashed button hover style error (#1934)
Browse files Browse the repository at this point in the history
  • Loading branch information
anlyyao authored Sep 11, 2024
1 parent 6ffc455 commit 40ecdc1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 87 deletions.
72 changes: 1 addition & 71 deletions style/mobile/components/button/v2/_index.less
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@
}
}

&--dashed,
&--outline {
color: @button-default-outline-color;
background-color: transparent;
Expand Down Expand Up @@ -328,77 +329,6 @@
&::after {
border-style: dashed;
}

&.@{button}--default {
color: @button-default-dashed-color;
background-color: transparent;

&::after {
border-color: @button-default-dashed-border-color;
}

&.@{button}--disabled {
background-color: transparent;
color: @button-default-dashed-disabled-color;

&::after {
border-color: @button-default-dashed-disabled-color;
}
}
}

&.@{button}--primary {
color: @button-primary-dashed-color;
background-color: transparent;

&::after {
border-color: @button-primary-dashed-border-color;
}

&.@{button}--disabled {
background-color: transparent;
color: @button-primary-dashed-disabled-color;

&::after {
border-color: @button-primary-dashed-disabled-color;
}
}
}

&.@{button}--danger {
color: @button-danger-dashed-color;
background-color: transparent;

&::after {
border-color: @button-danger-dashed-border-color;
}

&.@{button}--disabled {
background-color: transparent;
color: @button-danger-dashed-disabled-color;

&::after {
border-color: @button-danger-dashed-disabled-color;
}
}
}

&.@{button}--light {
color: @button-light-dashed-color;

&::after {
border-color: @button-light-dashed-border-color;
}

&.@{button}--disabled {
background-color: transparent;
color: @button-light-dashed-disabled-color;

&::after {
border-color: @button-light-dashed-disabled-color;
}
}
}
}

.@{prefix}-loading + &__content:not(:empty),
Expand Down
17 changes: 1 addition & 16 deletions style/mobile/components/button/v2/_var.less
Original file line number Diff line number Diff line change
Expand Up @@ -73,22 +73,7 @@
@button-light-outline-border-color: var(--td-button-light-outline-border-color, @button-light-outline-color);
@button-light-outline-bg-color: var(--td-button-light-outline-bg-color, @brand-color-light);
@button-light-outline-disabled-color: var(--td-button-light-outline-disabled-color, @brand-color-disabled);
// default + dashed
@button-default-dashed-color: var(--td-button-default-dashed-color, @text-color-primary);
@button-default-dashed-border-color: var(--td-button-default-dashed-border-color, @component-border);
@button-default-dashed-disabled-color: var(--td-button-default-dashed-disabled-color, @component-border);
// primary + dashed
@button-primary-dashed-color: var(--td-button-primary-dashed-color, @brand-color);
@button-primary-dashed-border-color: var(--td-button-primary-dashed-border-color, @button-primary-dashed-color);
@button-primary-dashed-disabled-color: var(--td-button-primary-dashed-disabled-color, @brand-color-disabled);
// danger + dashed
@button-danger-dashed-color: var(--td-button-danger-dashed-color, @error-color);
@button-danger-dashed-border-color: var(--td-button-danger-dashed-border-color, @button-danger-dashed-color);
@button-danger-dashed-disabled-color: var(--td-button-danger-dashed-disabled-color, @button-danger-disabled-color);
// light + dashed
@button-light-dashed-color: var(--td-button-light-dashed-color, @brand-color);
@button-light-dashed-border-color: var(--td-button-light-dashed-border-color, @button-primary-dashed-color);
@button-light-dashed-disabled-color: var(--td-button-light-dashed-disabled-color, @component-border);

// primary + text
@button-primary-text-color: var(--td-button-primary-text-color, @brand-color);
@button-primary-text-disabled-color: var(--td-button-primary-text-disabled-color, @brand-color-disabled);
Expand Down

0 comments on commit 40ecdc1

Please sign in to comment.