From c7a5951d2eaa7fe096996bfbddf721b221dc6e8c Mon Sep 17 00:00:00 2001 From: "Jonathan S. Katz" Date: Sat, 22 Apr 2023 14:44:48 -0400 Subject: [PATCH] Toggle visibility of documentation anchors on hover By default, this hides the anchors that are made visible[1] and makes them only appear when a user hovers over the appropriate element. [1] https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=e2922702a3 Author: Brar Piening Reviewed-by: Jonathan Katz --- media/css/main.css | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/media/css/main.css b/media/css/main.css index 5f8bfdd5..80afc3d1 100644 --- a/media/css/main.css +++ b/media/css/main.css @@ -1175,6 +1175,20 @@ code, padding-right: 2em; } +/** + * Styles for anchors to deeper documentation links. This makes an element + * (currently "#") appear next to links, so a reader can click on it and have + * the anchor appear in the URL. + */ +#docContent a.id_link { + color: inherit; + visibility: hidden; +} + +#docContent *:hover > a.id_link { + visibility: visible; +} + /** * Various callout boxes for docs, including warning, caution, note, tip */