Skip to content

Commit

Permalink
fix icon hover & dropdown focus
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikita-Polyakov committed Mar 5, 2024
1 parent 8da8c49 commit 5296bd5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 2 additions & 0 deletions src/components/shared/Button/SortButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,7 @@ export default class SortButton extends Vue {
&--descending {
transform: rotate(180deg);
}
@include icon-styles($hoverColor: var(--s-color-theme-accent-hover));
}
</style>
2 changes: 1 addition & 1 deletion src/components/shared/LinksDropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default class LinksDropdown extends Mixins(TranslationMixin) {
&,
.el-tooltip {
&:focus {
outline: auto;
@include focus-outline($inner: true);
}
}
}
Expand Down
13 changes: 7 additions & 6 deletions src/styles/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -346,14 +346,16 @@ $button-custom-shadow: -1px -1px 5px rgba(0, 0, 0, 0.05), 1px 1px 5px rgba(0, 0,
}
}

@mixin icon-styles($hasPointerCursor: false) {
@mixin icon-styles($hasPointerCursor: false, $withHover: true, $hoverColor: var(--s-color-base-content-secondary)) {
color: var(--s-color-base-content-tertiary);
transition: var(--s-transition-default);
@if $hasPointerCursor == true {
cursor: pointer;
}
&:hover {
color: var(--s-color-base-content-secondary);
@if $withHover == true {
&:hover {
color: $hoverColor;
}
}
}

Expand Down Expand Up @@ -488,9 +490,8 @@ $button-custom-shadow: -1px -1px 5px rgba(0, 0, 0, 0.05), 1px 1px 5px rgba(0, 0,
font-weight: 500 !important;
}

[class^='s-icon-'],
[class*=' s-icon-'] {
@include icon-styles;
i:not(.sort-icon) {
@include icon-styles($withHover: false);
}
}

Expand Down

0 comments on commit 5296bd5

Please sign in to comment.