Skip to content

Commit

Permalink
fix: fixed problem with hover on touch screens
Browse files Browse the repository at this point in the history
  • Loading branch information
berezinant committed Oct 24, 2024
1 parent bf9126a commit 6321041
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@
padding: var(--size-s2);
}

&:hover {
background-color: var(--color-b08);
@media (hover: hover) {
&:hover {
background-color: var(--color-b08);
}
}

&:active {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,13 @@
line-height: 0;
will-change: background-color;

&:hover {
@media (hover: hover) {
&:hover {
background-color: var(--color-b08);
}
}

&:active {
background-color: var(--color-w10);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,14 @@ button.platform-tag {
--platform-tag-color: #9585f9;
}

.filter-section .platform-tag[data-active]:hover {
@media (hover: hover) {
.filter-section .platform-tag[data-active]:hover {
color: #fff;
background-color: rgba(186, 186, 187, 0.7);
}
}

.filter-section .platform-tag[data-active]:active {
color: #fff;
background-color: rgba(186, 186, 187, 0.7);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,13 @@
}
}

&:hover {
@media (hover: hover) {
&:hover {
background-color: var(--toc-hover-color);
}
}

&:active {
background-color: var(--toc-hover-color);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1448,7 +1448,13 @@ button.platform-tag:focus-visible {
--platform-tag-color: #9585f9;
}

.filter-section .platform-tag[data-active]:hover {
@media (hover: hover) {
.filter-section .platform-tag[data-active]:hover {
color: #fff;
background-color: rgba(186, 186, 187, 0.7);
}
}
.filter-section .platform-tag[data-active]:active {
color: #fff;
background-color: rgba(186, 186, 187, 0.7);
}
Expand Down Expand Up @@ -1836,7 +1842,7 @@ button.platform-tag:focus-visible {

:root {
--toc-hover-color: var(--color-b08);
--toc-font: 400 13px/20px var(--font-family-default);
--toc-font: 400 13px/24px var(--font-family-default);
--toc-color: var(--color-text);
}

Expand Down Expand Up @@ -1897,7 +1903,12 @@ button.platform-tag:focus-visible {
filter: invert(0);
}

.toc--button:hover {
@media (hover: hover) {
.toc--button:hover {
background-color: var(--toc-hover-color);
}
}
.toc--button:active {
background-color: var(--toc-hover-color);
}

Expand All @@ -1907,8 +1918,6 @@ button.platform-tag:focus-visible {
}

.toc--link {
display: inline-flex;
align-items: center;
box-sizing: border-box;
width: 100%;
height: calc(100% - 16px);
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

0 comments on commit 6321041

Please sign in to comment.