RE: [css3-box] padding: auto

± From: Lea Verou [mailto:leaverou@gmail.com] 
± Sent: Monday, July 16, 2012 4:08 PM
± 
± Basically, what's needed is an `auto` value for padding, that makes it 
± behave as `auto` does for margin. In the latest ED there *is* a new 
± `auto` value allowed for the padding properties [1], but the way it's 
± supposed to work is not explained anywhere. 
± 
± [1]: http://dev.w3.org/csswg/css3-box/#the-padding-properties
 
Auto padding may create a new problem of what happens if there is no extra space and padding is shrinking to zero, which is rarely an acceptable value for padding.

I looked at all your links (good collection btw) and all but one (Perch) have extra padding that wouldn't be there if they just had "padding:auto".

It seems that if "padding:auto" is added, we'll also need 'min-padding'. Which may be reasonable.

Or... if generated content is extended to make it possible to add a wrapper to any element, that would make the same result possible:

	body::around { 
		margin:0; 
		background:url(bg.jpg); 
		min-height: 100vh;
	}
	body { 
		margin:10 auto; 
		max-width: 40em; 
		...
	}	

I believe this kind of generated content has been discussed, but I can't point to any discussion or proposal.....

Alex

Received on Tuesday, 17 July 2012 19:01:43 UTC