Holy Family & CCTN - Orlando, FL

ShiftNav Open: Gray Out Content (Not Home)

Assigned to
Kyle Sullivan, Web Development at Diocesan Kyle S.

Comments & Events

Kyle Sullivan, Web Development at Diocesan
Below is the code I used to accomplish this. The key is position: fixed.
body {
  div#page::after {
    position: fixed;
    content: "";
    background: $navbar;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    transition: 0.25s ease-in;
  }

  &.shiftnav-open {
    div#page::after {
      opacity: 0.55;
      z-index: 9999;
    }
  }
}
Kyle Sullivan, Web Development at Diocesan
Kyle Sullivan completed this to-do.
Kyle Sullivan, Web Development at Diocesan
It's entirely possible that this will lead to some complications across this site that can usually be resolved by applying z-index: 1 to a component's parent element.