Hi Jukka, thanks for the great reply.
You make a very good point. I definitely agree with you thinking on
shorthand.
In fact, right after I confirmed my thinking on this list, I added the
below comment to my "layout" style sheet (put in spot where I thought it
would be most pertinent):
/*
**
** Note on shorthand:
** (T, R, B, L)
margin: 0; = [ALL]
margin: 0 10px; = [Top/Bottom], [Right/Left]
margin: 5px 10px 2px; = Top, [Right/Left], Bottom
margin: 5px 1px 4px 2px; = Top, Right, Bottom, Left
**
** Ref: http://www.w3.org/TR/CSS21/box.html#propdef-margin
**
*/
I am a big fan of commenting my code.
Here is another example of comments in my css in relation to background
shorthand code:
/*
**
** For background, you don't have to specify all values.
** If a value is omitted, its initial value is used.
** The initial values for the individual background properties are as
follows:
* color: transparent
* image: none
* repeat: repeat
* attachment: scroll
* position: 0% 0%
** Remember that when you give two values for position, they have to
appear together.
** When using length or percentage values, put the horizontal value first.
**
** Ref:
http://www.456bereastreet.com/archive/200502/efficient_css_with_shorthand_properties/
**
*/
Not to say the above comments "make it all better"... Even the above
comments are not so clear (I am sure I could make it more descriptive.)
I know how frustrating it is to debug/handle code that has not comments
and/or documentation at all. Or how confusing it can be to re-learn old
code... That can be extremely frustrating.
Hmmm, I have never found the time to make one, but I think a Style Guide
could be helpful in this type of situation -- documentation of how/why
shorthand was used in site CSS.
Anyway, thanks for your thoughts, I will definitely take them into
consideration.
Sorry my thinking in this email is scattered... Kinda early morning, and
my brain has been in CSS-land for past several hours. :D
Thanks again!
Cheers,
Micky
--
Wishlists: <http://snipurl.com/1gqpj>
Switch: <http://browsehappy.com/>
BCC?: <http://snipurl.com/w6f8>
My: <http://del.icio.us/mhulse>
______________________________________________________________________
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/