Skip to content

Latest commit

 

History

History
14 lines (8 loc) · 1.02 KB

general.md

File metadata and controls

14 lines (8 loc) · 1.02 KB

General issues

Interplay between position fixed with transformed ancestors

By default position: fixed elements are positioned relative to the viewport which is useful for creating "visually hidden" classes. However if a parent of a position: fixed element has a transform then that ancestor is the new context. The spec states it this way:

When an ancestor has the transform property set to something different than none then this ancestor is used as container instead of the viewport

Test case

See the Pen gLZmRq by Adam Simpson (@asimpson) on CodePen.

<script async src="https://production-assets.codepen.io/assets/embed/ei.js"></script>