W3C home > Mailing lists > Public > public-css-archive@w3.org > December 2019

Re: [csswg-drafts] [resize-observer] Does not observe changes to the most important size (#4583)

From: Oriol Brufau via GitHub <sysbot+gh@w3.org>
Date: Fri, 13 Dec 2019 17:47:54 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-565538575-1576259272-sysbot+gh@w3.org>
From https://drafts.csswg.org/resize-observer/#api,

> content-box : size of content area as defined in CSS2.

From https://drafts.csswg.org/css-box-3/#content-area

> ![](https://drafts.csswg.org/css-box-3/images/box.png)

So what makes you think that padding is included?

```js
var el = document.createElement("div");
el.style.width = "50px";
el.style.padding = "10px";
document.body.appendChild(el);
new ResizeObserver(entries => {
  alert(entries[0].contentBoxSize.inlineSize); // 50
}).observe(el);
```

-- 
GitHub Notification of comment by Loirooriol
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4583#issuecomment-565538575 using your GitHub account
Received on Friday, 13 December 2019 17:47:56 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 24 March 2022 20:27:05 UTC