diff options
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Highlight list rows on hover only under a mouse
On a touch screen the highlight stayed on whichever row was tapped last.
Diffstat (limited to 'assets/cgit.css')
-rw-r--r--assets/cgit.css28
1 file changed, 15 insertions, 13 deletions
diff --git a/assets/cgit.css b/assets/cgit.css
index cf62df8..7a4472a 100644
--- a/assets/cgit.css
+++ b/assets/cgit.css
@@ -366,28 +366,30 @@ div#cgit table.list tr:nth-child(odd) {
background: var(--bg);
}
-div#cgit table.list tr:hover {
- background: var(--row-hover);
-}
-
div#cgit table.list tr.nohover {
background: var(--bg);
}
-div#cgit table.list tr.nohover:hover {
- background: var(--bg);
-}
-
div#cgit table.list tbody + tbody > tr:first-child > th {
padding-top: calc(1lh + 0.95em);
}
-div#cgit table.list tr.nohover-highlight:hover:nth-child(even) {
- background: var(--surface-2);
-}
+@media (hover: hover) {
+ div#cgit table.list tr:hover {
+ background: var(--row-hover);
+ }
-div#cgit table.list tr.nohover-highlight:hover:nth-child(odd) {
- background: var(--bg);
+ div#cgit table.list tr.nohover:hover {
+ background: var(--bg);
+ }
+
+ div#cgit table.list tr.nohover-highlight:hover:nth-child(even) {
+ background: var(--surface-2);
+ }
+
+ div#cgit table.list tr.nohover-highlight:hover:nth-child(odd) {
+ background: var(--bg);
+ }
}
div#cgit table.list th {