W3C home > Mailing lists > Public > public-css-archive@w3.org > March 2017

[csswg-drafts] [cssom-view] Expose inner border dimensions

From: Richard Gibson via GitHub <sysbot+gh@w3.org>
Date: Mon, 27 Mar 2017 19:19:03 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-217347489-1490642341-sysbot+gh@w3.org>
gibson042 has just created a new issue for https://github.com/w3c/csswg-drafts:

== [cssom-view] Expose inner border dimensions ==
cf. https://github.com/jquery/jquery/issues/3589#issuecomment-289548410

There seems to be no good method for calculating the dimensions of an element's inner border edge (i.e., content area plus padding plus non-floating scrollbars). One can subtract computed border dimensions from `offsetWidth` or `offsetHeight` in the special case of a block-layout HTMLElement, but as far as I can tell it's otherwise impossible.

I think the Element interface should expose something for such calculations, e.g.
* `scrollGutterWidth`/`scrollGutterHeight` (the space lost to scrollbars), or
* `scrollbarWidth`/`scrollbarHeight` (the scrollbar width), along with a method for identifying non-floating scrollbars, or
* `fullClientWidth`/`fullClientHeight` (the dimensions of an inner border edge).

The last one seems most consistent with the rest of CSSOM View.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1129 using your GitHub account
Received on Monday, 27 March 2017 19:19:09 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:09 UTC