Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Dimensions: fall back to offsetWidth/Height for border-box in IE #4223
If box-sizing is unreliable and box-sizing is border-box, we can use offsetWidth and offsetHeight in most situations. In the situations we can't, box-sizing seems to be reliable and we can use computed CSS. Specifically, in these cases:
The downside here is that we lose fractional values for border-box dimensions in IE9-11. I can live with that, but open to review.
With @gibson042's help, got it down to +9.
Applying my suggestions here would take this from +31 down to +6 bytes with no behavior change, but giving up that blocks of tests makes me think that this is the wrong approach, or at least incomplete. How would you feel about the approach from #4102 (comment) ?
The issue also applies to
We talked about
I agree with you here, but I'm trying to gently usher IE out the door, and bringing in such a big hammer—especially one that needs workarounds on workarounds for things like SVG—runs the risk of inviting more strain on a weak point.
OK, fair point. I'll re-review with that in mind.
IE9-11 are happy again with no tests skipped and size impact has been reduced to +6 bytes. Plus, the use of