Skip to content

Commit

Permalink
fix(themes): ignore hover styles on mobile device (#129)
Browse files Browse the repository at this point in the history
Co-authored-by: Theeraphat-Sorasetsakul <[email protected]>
  • Loading branch information
1 parent 4648b8d commit ac279a9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
12 changes: 7 additions & 5 deletions packages/elemental-theme/src/custom-elements/ef-toggle.less
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,12 @@
background-color: @scheme-color-primary;
}

&:hover:not([readonly]), &[focused=visible] {
box-shadow: 0 0 (@global-box-shadow-blur-radius * 0.75) @input-focused-border-color;
[part=toggle] {
border-color: @input-focused-border-color;
.desktop-specific({
&:hover:not([readonly]), &[focused=visible] {
box-shadow: 0 0 (@global-box-shadow-blur-radius * 0.75) @input-focused-border-color;
[part=toggle] {
border-color: @input-focused-border-color;
}
}
}
});
}
16 changes: 9 additions & 7 deletions packages/halo-theme/src/custom-elements/ef-toggle.less
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,18 @@
right: @switch-margin;
}

&:hover:not([readonly]) {
color: @input-hover-text-color;
[part=toggle] {
border-color: @scheme-color-primary;
&::after {
background-color: @scheme-color-primary;
.desktop-specific({
&:hover:not([readonly]) {
color: @input-hover-text-color;
[part=toggle] {
border-color: @scheme-color-primary;
&::after {
background-color: @scheme-color-primary;
border-color: @scheme-color-primary;
}
}
}
}
});

// Spacial style for dark theme only
& when (@variant = dark) {
Expand Down

0 comments on commit ac279a9

Please sign in to comment.