On Wed, 11 Jul 2007, Micky Hulse wrote:

> margin: 20px 0 0 0;
>
> Can be shortened-down to this:
>
> margin 20px 0 0;
>
> Because the LEFT value will obtain a value from the RIGHT value. Correct?

It's a correct observation, as it has already been commented (and as can 
be checked from CSS specifications).

Whether it's _useful_ is a different thing. You had to ask about it, and 
you (being a reader of this list) are probably more educated in CSS 
matters than most authors. Thus, the odds are that when someone reads your 
CSS code later, he will be puzzled. He may need to check it, or he might 
even just make a guess of what it means. Even _you_, upon encountering 
your own CSS code five years later, might be puzzled, if you have 
forgotten the issue. (Well, probably not now that it has been discussed, 
but people might read about a "handy" shorthand, use it once or twice, and 
forget it.)

So what's the gain? Two characters, to be weighed against the risks of 
confusion and misunderstandings. It's hard to imagine a situation where 
this would be useful. The rarity of the shorthand speaks against using it.

Even shorthands like margin: 1em 0 are puzzling to people who have not 
read about CSS and try to understand CSS intuitively (as many CSS 
expressions can be understood). However, they are useful since there are 
so many occasions for using them and they are commonly used.

-- 
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/

______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to