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

Here's how jQuery ended up accounting for scroll gutters when calculating inner border dimensions with the current CSS APIs: https://github.com/jquery/jquery/blob/80f1c8239e9d5f793f3e54e0cb8d7bd0747e4856/src/css.js#L131-L143
```js
// offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border
// Assuming integer scroll gutter, subtract the rest and round down
delta += Math.max( 0, Math.ceil(
 elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] -
 computedVal -
 delta -
 extra -
 0.5
) );
```

-- 
GitHub Notification of comment by gibson042
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1129#issuecomment-316242150 using your GitHub account

Received on Wednesday, 19 July 2017 01:03:48 UTC