« get me outta code hell

css: move general a:hover underline to interaction layer - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/static/css/miscellany.css
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2026-03-18 23:45:34 -0300
committer(quasar) nebula <qznebula@protonmail.com>2026-03-18 23:45:34 -0300
commit48e5eab300ea58c5c8a262c8e90893ffd96491a1 (patch)
tree8d2685d2b40e65ff32a140f7efdd52daf86c9a20 /src/static/css/miscellany.css
parent53775df1c9f59edfacab00fec709756ad20ef566 (diff)
css: move general a:hover underline to interaction layer preview
Diffstat (limited to 'src/static/css/miscellany.css')
-rw-r--r--src/static/css/miscellany.css23
1 files changed, 18 insertions, 5 deletions
diff --git a/src/static/css/miscellany.css b/src/static/css/miscellany.css
index 70c7b571..a9c24732 100644
--- a/src/static/css/miscellany.css
+++ b/src/static/css/miscellany.css
@@ -143,11 +143,6 @@
     text-decoration: none;
   }
 
-  a:hover {
-    text-decoration: underline;
-    text-decoration-style: solid !important;
-  }
-
   a.current {
     font-weight: 800;
   }
@@ -165,6 +160,24 @@
   }
 }
 
+@Layer interaction {
+  /* This is an !important rule because it's really applicable
+   * pretty much anywhere, but the selector specificity is lower
+   * than most selectors which, say, add a dotted underline to
+   * begin with - those would take cascading priority.
+   *
+   * Similarly, this rule has to live in the interaction layer,
+   * because that's where other underline hover cues are set.
+   * If we set set it any higher (e.g. in print) the !important
+   * takes universal priority over !important's set in deeper
+   * layers - like interaction.
+   */
+  a:hover {
+    text-decoration: underline;
+    text-decoration-style: solid !important;
+  }
+}
+
 /* Links with symbols */
 
 @layer print {