W3C home > Mailing lists > Public > www-style@w3.org > January 2008

Re: Alignment property proposal

From: James Elmore <James.Elmore@cox.net>
Date: Wed, 23 Jan 2008 07:31:13 -0800
Message-Id: <29C370E4-1B60-4EC8-9F0E-DF4E54BA7451@cox.net>
Cc: www-style@w3.org
To: David Woolley <forums@david-woolley.me.uk>

On Jan 23, 2008, at 12:12 AM, David Woolley wrote:

>
> L. David Baron wrote:
>> CSS already has a way to center blocks, but many authors find it
>> (use of 'auto' margins) confusing and/or non-intuitive.
>
> Having two different ways of doing it would also be confusing and  
> would need the interactions explaining.  In general, such tactics  
> make it more difficult for people trying to override properties,  
> because they have to know that they need to override both (although  
> I think that few people would want to override block centering -  
> although many might want to override text-align centre).

It seems to me that what we want is not two different ways of  
centering a block, but two different ways to express the concept of a  
centered block. (As I have said before, sometimes designers want to  
think in terms of aligning or centering blocks, and some times in  
terms of the sizes of margins. Both of these may have the same  
effect, they just are different mental models.) So, what if we  
define, for example, "block-align: center;" and say "margins will be  
adjusted to make this happen."

Then authors can use either (margins or block-align) and the final  
result will be clear, especially to the poor implementers who  
otherwise might have to juggle two conflicting methods of aligning a  
block.

Of course (now that I think about it) we also need to either state  
that "in cases where both margins and block-alignments are set, the  
margin values will override the block-alignment values" OR "the last  
set value of margin and block-align will override earlier values".

>
> Is it possible to make the new property simply be a shorthand for  
> margin auto.  (I guess the main difference between that and what  
> people want might be that they want something that defaults to  
> inherit.  However, I think that the real problem with margin auto  
> is that the concept is too mathematical, rather than the  
> inheritance rules.)

Both the inheritance rules, and the mathematical concept can be  
problems. If we allow 'block-align: center;' then, in the future, we  
can add 'block-align: top;' (or other combinations) to provide many  
more alignment possibilities, something I have been promoting.

>
> -- 
> David Woolley
> Emails are not formal business letters, whatever businesses may want.
> RFC1855 says there should be an address here, but, in a world of spam,
> that is no longer good advice, as archive address hiding may not work.
>

James Elmore
Received on Wednesday, 23 January 2008 15:31:37 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:58 GMT