-
Notifications
You must be signed in to change notification settings - Fork 679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[css-position-3] link to absolute-position containing block #11239
base: main
Are you sure you want to change the base?
Conversation
svgeesus marked as non substantive for IPR from ash-nazg. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you changing CSS2 in a PR that says [css-position-3]?
AFAIK CSS2 is in a state where we are not sure what changes have happened since REC, and further divergence would make things messier.
Better stick to CSS Position.
This was not intentional. I thought GitHub would prompt me. How can I now exclude the CSS2 changes from the pull request? |
Reset your branch to the right commit and force-push it. |
Done. |
The CSS2 section contains relevant information not present in the CSS Position section |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two concepts:
- https://drafts.csswg.org/css-position/#original-containing-block
- https://drafts.csswg.org/css-position/#absolute-position-containing-block
It seems like the spec was trying to link to the former one. However, testcase:
<!DOCTYPE html>
<div style="display: inline-grid; grid-template: 50px 50px 50px / 50px 50px 50px; border: solid; position: relative">
<div style="grid-area: 2 / 2 / 3 / 3; background: cyan; position: absolute; width: 100%; height: 100%"></div>
</div>
The percentages resolve to the grid area in Gecko, Blink and WebKit, so it's not the "original containing block".
So the edit seems good but it has behavior implications. Then I think it becomes substantive for IPR, and requires approval by editor discretion or CSSWG.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, so some archeology:
- The "original containing block" term was added in May 2024 in e0a3329
- The "absolute-position containing block" term was added in Aug 2024 in 046ce52
- The reference to the "original containing block" was added in Sep 2021 in 40361af
Therefore, despite using the same words, it wasn't referring to the original containing block. Then I think this PR isn't affecting conformance after all.
But better let the editors confirm, I guess.
At the time of submission, I was not aware of the term "original containing block" as defined in the specification. I'm not saying the term did not exist; I simply did not consider looking up [=containing block=], as I assumed I already understood what 'containing block' means. My interpretation of the wording "original containing block" was that it referred to the containing block from which the 'inset-modified containing block' was derived. The use of the word 'however' suggested this interpretation to me, emphasizing that percentage calculations are not performed against the 'inset-modified containing block' but rather the box serving as the reference from which the offsets of the 'inset-modified containing block' were calculated. I inferred this interpretation directly from the definition in section 3.5: "For an absolutely positioned box, the inset properties effectively reduce the containing block into which it is sized and positioned by the specified amounts. The resulting rectangle is called the inset-modified containing block. (For disambiguation, the actual containing block of an absolutely positioned box can also be called the absolute-position containing block.)" My understanding was that "actual containing block" is equivalent to "original containing block." This is why, in the pull request message, I wrote: "In this context, 'the original containing block' is the 'absolute-position containing block.'" |
I am submitting the pull request under the CC0 license. |
In this context, 'the original containing block' is the 'absolute-position containing block'