Re: [css3-box] padding: auto

On Jul 17, 2012, at 12:00, Alex Mogilevsky wrote:

> 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.

Thatís also a problem with margin:auto, yet CSS doesnít include a mechanism for min-margin. Btw, this would be trivial if the min() function hadn't been dropped from css3-values, and it wouldn't require cluttering CSS with a bunch of new properties.
In any case, I don't think this problem should hold padding:auto back. Authors could solve it with media queries until a mechanism for min-padding is introduced.

> 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.....
There was an ::outside pseudo-element, part of the great css3-content draft from 2003 [1] that was abandoned and never implemented... 


Received on Wednesday, 18 July 2012 19:48:23 UTC