W3C home > Mailing lists > Public > www-style@w3.org > July 2015

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

From: Florian Rivoal <florian@rivoal.net>
Date: Wed, 8 Jul 2015 16:38:34 +0200
Cc: Patrick Dark <www-style.at.w3.org@patrick.dark.name>, "www-style@w3.org" <www-style@w3.org>
Message-Id: <ECF1170B-812A-4077-A990-3B18ADED83DF@rivoal.net>
To: Jonathan Kingston <jonathan@jooped.com>

> On 03 Jul 2015, at 09:18, Jonathan Kingston <jonathan@jooped.com> wrote:
> 
> Sorry for the super delayed response.
> 
> >>calc however as mentioned removes meaning
> >There are no semantics tied to CSS property values
> 
> Less 'semantic' and more readable, CSS properties like all programming languages have intent. The easier that is to read the easier a developers life is.

I agree, but it has to be weighted against how often that's needed and what the cost of specifying and implementing are. Browser vendors don't seem too keep on this cost / benefit ratio at the moment.

> The flex example would still need to use calc with min-width specified also variable width is often required.

I'm not sure I follow. Look at this example:

http://jsbin.com/favini/edit?html,css,output <http://jsbin.com/favini/edit?html,css,output>

You can do the equivalent of your
> width: 20%;
> margin: 1rem 2rem;
> box-sizing: margin-box;

With just as few properties (fewer if you count display), and without invoking calc.

This isn't to say that box-sizing:margin-box is wrong, but it isn't urgently needed.

 - Florian
Received on Wednesday, 8 July 2015 14:39:08 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:52:18 UTC