Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x

js.module.css

Same filename in this branch
  1. 11.1.x core/themes/stable9/css/system/components/js.module.css

Utility classes to assist with JavaScript functionality.

File

core/modules/system/css/components/js.module.css

View source
  1. /**
  2. * @file
  3. * Utility classes to assist with JavaScript functionality.
  4. */
  5. /**
  6. * For anything you want to hide on page load when JS is enabled, so
  7. * that you can use the JS to control visibility and avoid flicker.
  8. */
  9. .js .js-hide {
  10. display: none;
  11. }
  12. /**
  13. * For anything you want to show on page load only when JS is enabled.
  14. */
  15. .js-show {
  16. display: none;
  17. }
  18. .js .js-show {
  19. display: block;
  20. }
  21. /**
  22. * Use the scripting media features for modern browsers to reduce layout shifts.
  23. */
  24. @media (scripting: enabled) {
  25. /* Extra specificity to override previous selector. */
  26. .js-hide.js-hide {
  27. display: none;
  28. }
  29. .js-show {
  30. display: block;
  31. }
  32. }

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal