From 2379b2bc0c40b092a2c382979e1f3ac44e359213 Mon Sep 17 00:00:00 2001 From: narcolepticinsomniac Date: Wed, 16 Feb 2022 14:29:49 -0500 Subject: [PATCH] always contrast zebra-stripe and action block --- popup/popup.css | 10 ++++++++-- popup/popup.js | 3 +++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/popup/popup.css b/popup/popup.css index 10128c8f..0dbde806 100644 --- a/popup/popup.css +++ b/popup/popup.css @@ -230,8 +230,14 @@ html[style] .entry-content { padding-right: 5px; } -.entry:nth-child(even) { - background-color: rgba(0, 0, 0, 0.05); +[data-ui-theme="light"] .zebra .entry:nth-child(even), +[data-ui-theme="light"] .reverse-zebra .entry:nth-child(odd) { + background-color: hsla(0, 0%, 50%, 0.1); +} + +[data-ui-theme="dark"] .zebra .entry:nth-child(even), +[data-ui-theme="dark"] .reverse-zebra .entry:nth-child(odd) { + background-color: hsla(0, 0%, 50%, 0.05); } .entry:nth-child(-n+10):before, diff --git a/popup/popup.js b/popup/popup.js index 7e7dd932..5949cc5a 100644 --- a/popup/popup.js +++ b/popup/popup.js @@ -293,6 +293,9 @@ function showStyles(frameResults) { } else { installed.appendChild(t.template.noStyles); } + const zebra = $('.entry:last-child:nth-child(odd)') && + !$('.styles-last') ? 'reverse-zebra' : 'zebra'; + $('#installed').classList.add(`${zebra}`); require(['/popup/hotkeys']); }