diff --git a/core/modules/system/css/components/js.module.css b/core/modules/system/css/components/js.module.css index f6c1c01ff90..645d94fa3d5 100644 --- a/core/modules/system/css/components/js.module.css +++ b/core/modules/system/css/components/js.module.css @@ -20,3 +20,16 @@ .js .js-show { display: block; } + +/** + * Use the scripting media features for modern browsers to reduce layout shifts. + */ +@media (scripting: enabled) { + /* Extra specificity to override previous selector. */ + .js-hide.js-hide { + display: none; + } + .js-show { + display: block; + } +}