Re: [css3-box] padding: auto

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