Skip to content

Commit

Permalink
show hover only when (pointer: fine)
Browse files Browse the repository at this point in the history
  • Loading branch information
roienatan committed Dec 4, 2023
1 parent 3f5669d commit cdff22f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
9 changes: 0 additions & 9 deletions src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -204,15 +204,6 @@ body {
}
}

/* Disable hover effects globally when using a touch device */
@media (hover: none) {
* {
:hover {
opacity: unset !important;
}
}
}

code {
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
monospace;
Expand Down
20 changes: 16 additions & 4 deletions src/shared/components/Tabs/Tab/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@
--tab-color: var(--tab-inactive-hover-color);
}

&:hover {
--tab-color: var(--tab-inactive-hover-color);
@media (hover: hover) and (pointer: fine) {
&:hover {
--tab-color: var(--tab-inactive-hover-color);
}
}

&:first-child {
Expand All @@ -50,11 +52,21 @@
--tab-bb-color: var(--secondary-text);
--tab-color: var(--secondary-text);

&:active,
&:hover {
&:active {
--tab-bb-color: var(--secondary-text);
--tab-color: var(--secondary-text);
}

@media (hover: hover) and (pointer: fine) {
&:hover {
--tab-bb-color: var(--secondary-text);
--tab-color: var(--secondary-text);
}
}
// &:hover {
// --tab-bb-color: var(--secondary-text);
// --tab-color: var(--secondary-text);
// }
}
.custom-tab--with-icon {
--tab-pb: 0;
Expand Down

0 comments on commit cdff22f

Please sign in to comment.