/*
Django CMS Components

Components for [Django CMS](https://www.django-cms.org/) UI. No examples
are provided, because the markup is dynamically generated by a third-party.

Reference:

- [Django CMS `.cms-` Class Components](https://github.com/divio/django-cms/tree/release/3.6.x/cms/static/cms/sass/components)

Styleguide Components.DjangoCMS
*/

/* Prevent excess scrollbar when logged into Django CMS */
/* NOTE: This code does NOT work */
/*
.cms-ready body {
  /* FAQ: CMS dynamically adds `margin-top` to `head` to fit toolbar height *\/
  /* WARNING: If the dynamic(!) header margin changes, then so should this *\/
  /* RFC: Consider creating JavaScript snippet (via CMS?) to solve this *\/
  height: calc(100vh - env(--cms-toolbar-height));
}
*/

/* Prevent anchor links from scrolling behind Django CMS header */
.cms-ready :target {
  scroll-margin-top: env(--cms-toolbar-height);
}

/* Prevent top-sticking content from scrolling behind Django CMS header */
.cms-ready .sticky-top /* Bootstrap class */,
.cms-ready .position-sticky.fixed-top /* Bootstrap class */ {
  top: env(--cms-toolbar-height);
}
