W3C home > Mailing lists > Public > public-css-archive@w3.org > May 2020

Re: [csswg-drafts] [css-display] Unclear definition of "formatting context" (#5105)

From: Oriol Brufau via GitHub <sysbot+gh@w3.org>
Date: Sat, 23 May 2020 21:02:45 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-633139953-1590267764-sysbot+gh@w3.org>
> a given formatting context doesn't see the outside world

Yes, and that's why we can't have all boxes establish an independent formatting context.

```html
<div style="float: left">float</div>
<div id="parent" style="border: 3px solid blue">
  <div id="child" style="border: 3px solid green">text</div>
</div>
```

Note that the float shrinks the line boxes of `#child`. But `#child` is not a sibling of the float, it's inside `#parent`. So if `#parent` established an independent formatting context, `#child` could not be affected by the float.

-- 
GitHub Notification of comment by Loirooriol
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5105#issuecomment-633139953 using your GitHub account
Received on Saturday, 23 May 2020 21:02:47 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:07 UTC