amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

amp-lightbox should reset its stacking context when it opens.

Open aghassemi opened this issue 6 years ago • 2 comments

We missed enforcing amp-lightbox to be a child of body like we did amp-sidebar, now depending on where in DOM developers add amp-lightbox they may run into stacking context issues like https://github.com/ampproject/amphtml/issues/21777 .

We should either move amp-lightbox to body before opening or have it reset the stacking context when opened and set it back when closed.

This can be done by adding

-amp-lightbox-ancestor {
    z-index: auto;
    position: static;
    opacity: 1;
    transform: none;
    -webkit-filter: none;
    perspective: none;
    transform-style: flat;
    -webkit-mask: none !important;
    transition: none !important;
    -webkit-overflow-scrolling: auto;
}

to all ancestors.

aghassemi avatar Apr 24 '19 17:04 aghassemi

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jan 30 '21 02:01 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jul 30 '22 18:07 stale[bot]