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

I can think of a few use-cases for border-box mostly that could be solved
with calc however as mentioned removes meaning.

However could I ask if there was a reason margin-box was never considered?
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));

On Sat, Jun 13, 2015 at 11:19 PM Patrick Dark <
www-style.at.w3.org@patrick.dark.name> wrote:

> On 6/13/2015 3:00 PM, Florian Rivoal wrote:
>
> Using calc to replace box-sizing is possible, and that's not specific to the padding-box value. But using box-sizing is supposed to make code easier to read understand and maintain.
>
>
> I don't think having multiple box models makes code easier to understand
> and maintain.
>
> |box-sizing| seems to be a patch for the reality that the CSS Working
> Group chose an inferior box model and isn't able to fix that. The
> |border-box| model is the most intuitive model and already in de facto,
> widespread use via the HTML |table| element, so it makes sense to keep
> |box-sizing: border-box|. The |padding-box| value seems to be something
> created for the sake of completeness. Completeness isn't an end unto
> itself; there needs to be a use case. The single use case you've shown
> isn't compelling.
>
>
> On 6/13/2015 3:00 PM, Florian Rivoal wrote:
>
> So I agree we can drop padding-box and not lose functionality, but we lose expressivity.
>
>
> You have expressivity in the form of the |calc| function.
>
> Typically, cases where |box-sizing: padding-box| would be useful are also
> covered by |box-sizing: border-box|, so you can often use that too.
>

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