body-scroll-lock.pcss.css

Same filename in other branches
  1. 11.x core/modules/navigation/css/components/body-scroll-lock.pcss.css

Body scroll lock with css only.

File

core/modules/navigation/css/components/body-scroll-lock.pcss.css

View source
  1. /**
  2. * @file
  3. * Body scroll lock with css only.
  4. */
  5. @import "../base/media-queries.pcss.css";
  6. [data-admin-toolbar-body-scroll="locked"] {
  7. overflow: clip;
  8. body {
  9. overflow: clip;
  10. }
  11. @media (--admin-toolbar-desktop) {
  12. overflow: initial;
  13. body {
  14. overflow: initial;
  15. }
  16. }
  17. }

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.