From 03a268e3189dae8be718d9bd622525b6a306ca2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Fri, 27 Oct 2023 00:44:27 +0200 Subject: [PATCH] theme: show anchor link and copy to clipboard button on mobile #697 --- static/css/theme.css | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/static/css/theme.css b/static/css/theme.css index 50e3b4ef16..87c0f12900 100644 --- a/static/css/theme.css +++ b/static/css/theme.css @@ -1175,6 +1175,12 @@ span > .copy-to-clipboard-button { div.highlight .copy-to-clipboard-button { 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 { display: block; } @@ -1545,6 +1551,12 @@ html[dir="rtl"] .expand > .expand-label > i.fa-chevron-right { position: absolute; 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, h3:hover .anchor,