View Single Post
Old 07-18-2022, 08:09 PM   #10
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by RbnJrg View Post
It's not neccesary to employ "background-color"; just writting "background" will work because that it is a shorthand [...]
Hmmm, okay. I wasn't aware of that one.

I tend to avoid many of the shorthands, like margin, and instead specify all 4 margins separately (if needed).

I believe it's more human-readable, instead of having to decipher EXACTLY what variables are what.

Examples from "margin" at MDN:

Code:
/* Apply to all four sides */
margin: 1em;

/* vertical | horizontal */
margin: 5% auto;

/* top | horizontal | bottom */
margin: 1em auto 2em;

/* top | right | bottom | left */
margin: 2px 1em 0 auto;
vs. something like:

Code:
blockquote {
	margin-top: 1em;
	margin-bottom: 2em;
}
Whenever I run across the shorthand, especially that 3rd or 4th one, I'm always scratching my head trying to remember which number stands for which variable.

When you have it fully typed out, there's no confusion there.
Tex2002ans is offline   Reply With Quote