container size and position fixed
I realized
container: size;
counts as parent similar as position: relative
to position: absolute
to position: fixed
.
There is no mention of this on MDN, does anyone have any information about this? Is this a bug, or is it in the spec?3 Replies
https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block point 4 🙂
MDN Web Docs
Layout and the containing block - CSS: Cascading Style Sheets | MDN
The size and position of an element are often impacted by its containing block. Most often, the containing block is the content area of an element's nearest block-level ancestor, but this is not always the case. In this article, we examine the factors that determine an element's containing block.
Thanks for your reply!
Thats unfortunate. So if I want to use fixed elements, they are not allowed to be inside a container.
I was also surprised when i learned about this fairly recently 🙂