0

According to the spec: https://www.w3.org/TR/CSS22/visuren.html#fixed-positioning :

9.6.1 Fixed positioning

Fixed positioning is a subcategory of absolute positioning. The only difference is that for a fixed positioned box, the containing block is established by the viewport.

But when a parent element has some properties like transform, a child element that has position: fixed behaves like positioned absolutely. Can someone point where the spec says this, and the list of all properties that cause this behavior?

LearningMath
  • 851
  • 4
  • 15
  • 38
  • 1
    you won't really find a full list because it doesn't really exist since new properties are always added so it's easy to have such information inside each property. In the duplicate, I tried to keep an up to date list. – Temani Afif Nov 30 '20 at 10:58
  • @TemaniAfif Thanks. I'm not fully aware how the updating/versioning for the spec works, but doesn't this contradict the CSS 2.2 spec where for fixed positioned elements it is said that the viewport is the containing block? Maybe the CSS 2.2 spec should say that there are exceptions where the viewport is not the containing block for fixed positioned elements? – LearningMath Nov 30 '20 at 12:06
  • @LearningMath - I agree. You can raise an issue on the 2.2 spec at https://github.com/w3c/csswg-drafts/issues. Start the subject line with [CSS2] . – Alohci Nov 30 '20 at 13:30

1 Answers1

2

Here's where the spec says it: https://www.w3.org/TR/css-transforms-1/#containing-block-for-all-descendants

I'm not aware of any listing of similar properties.

Alohci
  • 78,296
  • 16
  • 112
  • 156
  • 1
    you can probably follow up with his new question (https://stackoverflow.com/q/65077879/8620333) even if it sounds a bit opinion based – Temani Afif Dec 01 '20 at 00:01
  • 1
    @TemaniAfif - Thanks for pointing it to me, but I don't think I can. While I could take an educated guess why, I've no data or citations to back it up. – Alohci Dec 01 '20 at 01:41
  • a question for you: https://stackoverflow.com/q/65187156/8620333 :) .. a lot of boxes for me to write an accurate answer :/ – Temani Afif Dec 07 '20 at 21:04
  • Hi @TemaniAfif - I've provided an answer. Can you check it please? – Alohci Dec 08 '20 at 01:53