From 7a9105c89cfe79ed47217eb9278cdf252f6fa5ea Mon Sep 17 00:00:00 2001 From: RD WebDesign Date: Sat, 2 Dec 2023 02:25:15 -0300 Subject: [PATCH] Display a message when there are no modified settings to display The first rule adds a pseudo element (::before) with the desired text, to every `settings-container` element. The second rule removes that pseudo element from `settings-containers` with at least one child box without attribute `style="display: none;"` (in other words: at least one "visible" child box). This doesn't currently works in Firefox, but this may change in FF 121: https://www.mozilla.org/en-US/firefox/121.0beta/releasenotes/#note-789864 Signed-off-by: RD WebDesign --- style/pi-hole.css | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/style/pi-hole.css b/style/pi-hole.css index 338e8a11..8ccd24d4 100644 --- a/style/pi-hole.css +++ b/style/pi-hole.css @@ -553,6 +553,16 @@ td.details-control { width: calc((100% / var(--number-of-columns)) - 20px); } +.settings-container:has(.box[style*="display: none;"])::before { + content: "No modified settings to display"; + opacity: 0.7; + font-style: italic; +} + +.settings-container:has(.box:not([style*="display: none;"]))::before { + content: none; +} + @media screen and (max-width: 991px) { #domain-search-block { display: block;