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

Re: [css3-box] padding: auto

From: Lea Verou <leaverou@gmail.com>
Date: Wed, 18 Jul 2012 18:42:44 -0700
Cc: Alex Mogilevsky <alexmog@microsoft.com>, www-style list <www-style@w3.org>
Message-Id: <D7114632-B93B-4CB4-B14B-ECD9A067B034@gmail.com>
To: Sylvain Galineau <sylvaing@microsoft.com>
I never argued itís trivial, I argued itís useful. Useful enough to be worth dealing with difficulties like the ones you point out.

Potential collisions with margin:auto are a non-issue, it just needs a defined priority between the two (Iíd suggest padding:auto, but it doesnít really matter).

Interaction with (min|max)-width is tougher, at least when box-sizing: border-box or padding-box is in effect. I can think of several reasonable things that could happen, but I'm not an implementor and it's one of those things where it's easy to suggest something with bad implementability.

Iím still waiting for someone to explain what padding:auto thatís already defined in css3-box is supposed to do. Bert Bos is the editor, I guess he knows?

Lea Verou (http://lea.verou.me | @LeaVerou)

On Jul 18, 2012, at 18:01, Sylvain Galineau wrote:

> [Lea Verou:]
>> That's also a problem with margin:auto, yet CSS doesn't include a
>> mechanism for min-margin. 
> I'm not sure that's a 'problem' since both margin and padding have initial values
> of zero; but margin:auto is greatly simplified by the fact that the other dimensions 
> either do not support auto (border, padding) or resolve auto based on the content 
> (width). But as Mike Sherov points out, things change once you have padding:auto.
> Now you can have both margin:auto and padding:auto and it's unclear what should happen.
> At this point one could argue padding:auto implies  min-padding and min-margin.
> Then you also need to define whether/how this feeds into min/max-width/height calculations, 
> among other things... 
Received on Thursday, 19 July 2012 01:43:15 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:01 UTC