Skip to content

Commit

Permalink
Disable hover on mobile for ModeSelectButton.
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 100021e9888e6f822b3abeebe5a9f9e19b983f84
  • Loading branch information
cpojer committed Feb 26, 2025
1 parent 078ecbf commit 0fa2e29
Showing 1 changed file with 27 additions and 19 deletions.
46 changes: 27 additions & 19 deletions hera/ui/ModeSelectButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,28 @@ const style = css`
}
&:not(.disabled):not(.scale-disabled) {
&.hover,
&:hover,
@media (hover: hover) {
&.hover,
&:hover {
color: ${applyVar('text-color-bright')};
transform: scaleX(1.05) scaleY(1.02);
}
&.hover:after,
&:hover:after {
opacity: 1;
height: 340%;
${Breakpoints.xs} {
height: 280%;
}
${Breakpoints.sm} {
height: 300%;
}
}
}
&:active {
color: ${applyVar('text-color-bright')};
transform: scaleX(1.05) scaleY(1.02);
Expand All @@ -177,20 +197,6 @@ const style = css`
transform: scaleX(0.95) scaleY(0.98);
}
&.hover:after,
&:hover:after {
opacity: 1;
height: 340%;
${Breakpoints.xs} {
height: 280%;
}
${Breakpoints.sm} {
height: 300%;
}
}
&.active:after,
&:active:after {
height: 400%;
Expand Down Expand Up @@ -276,9 +282,11 @@ const wideStyle = css`
text-wrap: balance;
&:not(.disabled):not(.scale-disabled) {
&.hover:after,
&:hover:after {
height: 14em;
@media (hover: hover) {
&.hover:after,
&:hover:after {
height: 14em;
}
}
&.active:after,
Expand Down

0 comments on commit 0fa2e29

Please sign in to comment.