From e869a257d898bf23accb0f18d63d11ef7542651a Mon Sep 17 00:00:00 2001 From: ThibG Date: Tue, 28 Apr 2020 09:44:17 +0200 Subject: [PATCH] [Glitch] Fix messed up z-index when NoScript blocks media/previews Port f53bd1bef6c495470f84ee7d55d105a6b9d701f6 to glitch-soc Signed-off-by: Thibaut Girka --- app/javascript/flavours/glitch/styles/basics.scss | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/javascript/flavours/glitch/styles/basics.scss b/app/javascript/flavours/glitch/styles/basics.scss index 77631097a7..eb78b189d7 100644 --- a/app/javascript/flavours/glitch/styles/basics.scss +++ b/app/javascript/flavours/glitch/styles/basics.scss @@ -150,3 +150,15 @@ button { height: 100%; } } + +// NoScript adds a __ns__pop2top class to the full ancestry of blocked elements, +// to set the z-index to a high value, which messes with modals and dropdowns. +// Blocked elements can in theory only be media and frames/embeds, so they +// should only appear in statuses, under divs and articles. +body, +div, +article { + .__ns__pop2top { + z-index: unset !important; + } +}