Re: Alignment property proposal

On Jan 22, 2008, at 2:59 PM, L. David Baron wrote:
> On Tuesday 2008-01-22 22:15 +0000, David Woolley wrote:
>> The fundamental reason for this proposal was to have a property that
>> behaves like the CENTER element, and therefore does affect both  
>> contexts.
>> I haven't followed it closely enough, but I'm not sure that the  
>> interaction
>> between it, text-align and auto margins has actually been specified
>> adequately.
>>
>> In saying that the two functions must be separate, you are  
>> effectively
>> rejecting the whole proposal.  I don't think that is necessarily  
>> bad, as
>
> No, I don't think that's the case.
>
> The behavior of the CENTER element could be mapped to two CSS
> properties, e.g.:
>
> center { text-align: center; block-align: center; }
>
> and the new property that we're introducing could align blocks
> without changing text.

This sounds like the best approach to me. The big thing that <CENTER>  
could do that still can't be done easily in CSS, is that it could be  
set in one place, and all of its children blocks would be centered.  
With "margin:auto", you have to set it on each of those individual  
children.

So, yes, definitely there should be "block-align: center" to  
replicate this advantage that <CENTER> had. It also creates easy to  
understand concept symmetry with "text-align:center": "text-align"  
aligns its text child boxes and other inline children, and block- 
align aligns its block level children. What could be simpler? There  
is no need to bundle the functions of text-align (which we already  
have) within the function of block-align (which would be useful to  
have as an independent property).



On Jan 22, 2008, at 12:03 PM, fantasai wrote:
> I'm agreeing that if <center> is implemented with a CSS keyword,  
> making
> it a value of text-align seems to be the only way to make its  
> cascading
> behavior backwards-compatible.

If you want an element to replicate <center> in a backwards- 
compatible way, just set "text-align:center" AND "block-align:center"  
on a DIV. I can't imagine why that would be a problem, or why it  
would have to have its full functionality contained within one property.

I don't think <CENTER> needs to be un-deprecated. Just extract the  
behavior from it that we don't currently enjoy: of centering all  
block level children as easily as text-align can center all inline  
children.

Received on Wednesday, 23 January 2008 06:45:37 UTC