- From: gitspeaks via GitHub <sysbot+gh@w3.org>
- Date: Fri, 22 Nov 2024 12:07:51 +0000
- To: public-css-archive@w3.org
The "new model" proposes the following mental approach: 1. Establish a frame in reference to the "absolute-position containing block", called the "inset-modified containing block" (IMCB). 2. Position the absolutely positioned element within the IMCB. Now, consider the first example in this issue using the proposed solution: ```css #child { position: absolute; background-color: red; left: 10px; width: 100px; height: 50px; right: auto; margin-left: auto; margin-right: auto; } ``` 1. First, the `left` of the IMCB is established, and the `top` (and `bottom`) are implied by the default `self-alignment` property (`self-start`), which dictates that `top` is set according to the static position of `#child`, and `bottom` is set to `0`. 2. Second, according to the proposed solution, the bottom-right corner of the IMCB is determined based on the shrink-to-fit dimensions of `#child`, presumably resizing an already determined IMCB. It is this second step that still requires developers to think about offsets relative to the containing block, which essentially exercises the same mental model as in CSS2. -- GitHub Notification of comment by gitspeaks Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/11258#issuecomment-2493609226 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 22 November 2024 12:07:52 UTC