theme: show anchor link and copy to clipboard button on mobile #697

This commit is contained in:
Sören Weber 2023-10-27 00:44:27 +02:00
parent 6cdb5c1dad
commit 03a268e318
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D

View file

@ -1175,6 +1175,12 @@ span > .copy-to-clipboard-button {
div.highlight .copy-to-clipboard-button { div.highlight .copy-to-clipboard-button {
display: none; display: none;
} }
@media (any-hover: none) {
/* if there is at least one input device that does not support hover, we want to force the copy button */
div.highlight .copy-to-clipboard-button {
display: block;
}
}
div.highlight:hover .copy-to-clipboard-button { div.highlight:hover .copy-to-clipboard-button {
display: block; display: block;
} }
@ -1545,6 +1551,12 @@ html[dir="rtl"] .expand > .expand-label > i.fa-chevron-right {
position: absolute; position: absolute;
visibility: hidden; visibility: hidden;
} }
@media (any-hover: none) {
/* if there is at least one input device that does not support hover, we want to force the copy button */
.anchor {
visibility: visible;
}
}
h2:hover .anchor, h2:hover .anchor,
h3:hover .anchor, h3:hover .anchor,