From 9942320349e9ef6ddb02859d9ab37f3414c1e536 Mon Sep 17 00:00:00 2001 From: nod_ Date: Wed, 16 Apr 2025 15:35:07 +0200 Subject: Revert "Issue #3514748 by catch: Remove legacy browser support from js.module.css" This reverts commit f9be36f068f77b352dd1f70f67b4ec71a75e5ba4. --- core/modules/system/css/components/js.module.css | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'core') diff --git a/core/modules/system/css/components/js.module.css b/core/modules/system/css/components/js.module.css index 5b109ea4dc9..645d94fa3d5 100644 --- a/core/modules/system/css/components/js.module.css +++ b/core/modules/system/css/components/js.module.css @@ -3,22 +3,30 @@ * Utility classes to assist with JavaScript functionality. */ +/** + * For anything you want to hide on page load when JS is enabled, so + * that you can use the JS to control visibility and avoid flicker. + */ +.js .js-hide { + display: none; +} + /** * For anything you want to show on page load only when JS is enabled. */ .js-show { display: none; } +.js .js-show { + display: block; +} /** * Use the scripting media features for modern browsers to reduce layout shifts. */ @media (scripting: enabled) { - /** - * For anything you want to hide on page load when JS is enabled, so - * that you can use the JS to control visibility and avoid flicker. - */ - .js-hide { + /* Extra specificity to override previous selector. */ + .js-hide.js-hide { display: none; } .js-show { -- cgit v1.2.3