Hello, i wonder about the calculation of the width and height. It looks completely wrong:
I try to enforce the width and height by setting min, max and the size values, but it always ends up reducing it by the border size.
Usually i expected a similar behavior than in the browsers, so i don’t need to care about that stuff. The size is usually excluding border, margin and padding. Its very annoying in the code to calculate that all by hand respecting all values. That ends up in bad and not maintainable code…
I thought in earlier UI Toolkit versions it was correct, did i setup something wrong or is that just a big bug in the rendering engine?
Hi,
The sizing of the elements is done as box-sizing: border-box
in regular CSS.
The padding and border are always included in the size, but not the margin.
Thanks for the fast response.
Uh, I see and the default in css is content-box, that’s why it feels so broken. Is there any way to change that? I couldn’t find it in the supported USS Properties. If not, is it planned to add it?
It would really help to use content-box 
Should it be content-box
the default? Why arbitrarily change it? content-box
is much more useful in most situations, apart from being what the W3C refers as the “standard”.
This is going to be very confusing to those coming from a web-dev background…
1 Like
Again came to this Problem… is this planned to be added some when in the near future?
For all who needs that also, here is a workaround to calculate e.g. the width 2x of the height using only padding:
var padding = 2;
this.style.height = height;
this.style.width = 2f * (height - (2f * padding)) + (2f * padding);