Toggle visibility of documentation anchors on hover
authorJonathan S. Katz <jonathan.katz@excoventures.com>
Sat, 22 Apr 2023 18:44:48 +0000 (14:44 -0400)
committerJonathan S. Katz <jonathan.katz@excoventures.com>
Sat, 22 Apr 2023 18:44:48 +0000 (14:44 -0400)
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 <brar@gmx.de>
Reviewed-by: Jonathan Katz <jonathan.katz@excoventures.com>
media/css/main.css

index 5f8bfdd51c0be9d9ad17c78e60c6c8dcf4dd2870..80afc3d113cd1992b890ff2b90c04b991290b1b2 100644 (file)
@@ -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
   */