Re: [css-ui-3] box-sizing: padding-box

> On 22 Jun 2015, at 21:40, Jonathan Kingston <jonathan@jooped.com> wrote:
> 
> However could I ask if there was a reason margin-box was never considered?

It was considered. I've been through the archives of the www-style recently, and there were about 2 or 3 discussions during the last 15 years on this topic.

The conclusion was that it was possible, but that there was not enough demand / not enough use cases to
justify specifying, writing tests, implementing, etc...

> The use case would be brilliant for structure where by adding margin could control the layout and spacing of boxes. Using calc again is possible however having generalised selectors is difficult without support for:
> width: calc(20% - attr(margin-left) - attr(margin-right));

Without context of why you would want to do that, this isn't really what we normally call a use case.

If you want to gather support for this, it would be good not just to show syntax and explain what it would do, but give an example of a design where doing this would solve your problem, and explain why other solutions (calc? different layout modes such as flexbox or grid?) are less appropriate.

Personally, I am not against the proposals, but the browser vendors have been asked explicitly, and their response was that they are not interested.

 - Florian

Received on Monday, 22 June 2015 19:51:13 UTC