06-14-2009, 09:44 AM
|
#22 (permalink)
|
|
The Prestige
Join Date: Sep 2007
Location: Sweden, Stockholm
Posts: 1,080
Thanks: 115
|
Quote:
Originally Posted by CoryMathews
@adamdecaf
I do something similar. instead of:
PHP Code:
#content {
color: #FFFFFF;
}
#content a {
color: #009900;
}
#content a:hover {
color: #00CC00;
}
#content p {
clear: left;
}
#footer {
border: 1px solid #000000;
}
I would do
PHP Code:
#content { color:#FFF; }
#content a { color:#090; }
#content a:hover { color:#0C0; }
#content p { clear:left; }
#footer { border:1px solid #000; }
I always keep the css to 1 line. When you start spacing them out the files get so damn long. We widescreen monitors for a reason. Use them. Also if you put the attributes in alpha order its even easier to find them. (ie border, color, float, width..)
Same thing when I am programming I would do it in the format of
PHP Code:
class blah
{
function hello
{
if( a == b ) {
echo "Question";
for(x = 0; x < 10; x++) {
x++;
print x;
}
}
}
}
|
You sound really arrogant 
So just a question on your "1-line-css-rules": What would you do if you have a really big CSS rule? Still on 1 line? Widescreen does have its limits, and IMO it's easier to read if it's spaced out - even if it makes the document longer.
__________________
|
|
|
|