From 9bb2ed366621f248bf43d49ba79fbeda93041f32 Mon Sep 17 00:00:00 2001 From: "byte[]" Date: Sun, 12 Dec 2021 12:34:30 -0500 Subject: [PATCH] More robust spoilering --- assets/css/common/_base.scss | 42 ++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/assets/css/common/_base.scss b/assets/css/common/_base.scss index 4fa63996..159e4b11 100644 --- a/assets/css/common/_base.scss +++ b/assets/css/common/_base.scss @@ -258,6 +258,27 @@ blockquote blockquote blockquote blockquote blockquote blockquote { } } +.spoiler, .spoiler-revealed { + display: inline-block; + position: relative; +} + +.spoiler::before, .spoiler-revealed::before { + content: ' '; + display: block; + position: absolute; + pointer-events: none; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: $admin_links_hover_color; +} + +.spoiler:hover::before, .spoiler-revealed::before { + display: none; +} + .spoiler { background-color: $admin_links_hover_color; color: $admin_links_hover_color; @@ -294,27 +315,6 @@ blockquote blockquote blockquote blockquote blockquote blockquote { } } -.spoiler, .spoiler-revealed { - .imgspoiler { - background-color: $admin_links_hover_color; - img { - visibility: hidden; - } - } - - .imgspoiler:hover, .imgspoiler-revealed { - background-color: $admin_links_color; - img { - visibility: visible; - } - } - - .imgspoiler, .imgspoiler-revealed { - display: inline-block; - max-width: 100%; - } -} - .literal { white-space: pre-wrap; }