Fix #4746: Related tags checkboxes don't work properly on some phones (iOS).

Only use hover to hide the checkboxes on devices that support hovering
(i.e. computers with a mouse). On some mobile devices, a tap is used to
emulate hovering, which meant the tag had to be tapped twice.
This commit is contained in:
evazion
2021-03-05 18:22:47 -06:00
parent 58e42ee8d3
commit be162a8ae9

View File

@@ -15,11 +15,6 @@ div.related-tags {
width: 15em;
}
/* Hide the related tag checkbox unless it's checked or hovered. */
input[type="checkbox"] {
visibility: hidden;
}
li.selected a {
/* https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-text-stroke */
/* https://caniuse.com/text-stroke */
@@ -27,7 +22,14 @@ div.related-tags {
text-stroke: 0.5px;
}
li.selected, li:hover {
input[type="checkbox"] { visibility: visible; }
/* On computers with a mouse, hide the related tag checkbox unless it's checked or hovered. */
@media (hover: hover) {
input[type="checkbox"] {
visibility: hidden;
}
li.selected, li:hover {
input[type="checkbox"] { visibility: visible; }
}
}
}