Mental indentals

May 12, 2006

So you're coding a CSS style sheet. Why would you do this:

.forminnonedit { BORDER-RIGHT: #3258A1 1px solid; BORDER-TOP: #3258A1 1px solid;
 FONT:100%  verdana bold; BORDER-LEFT: #3258A1 1px solid; COLOR: #000000;
 BORDER-BOTTOM: #3258A1 1px solid; BACKGROUND-COLOR: #cccccc }

When you could do this:

.forminnonedit {
    border: 1px solid #3258A1;
    font:100%  verdana bold;
    color: #000000;
    background-color: #cccccc;
    }

Huh?

I'm not criticising the content particularly, just the layout. Indentation has long been a matter of religion amongst many of our brethren, but this looks like it's come out of some obfuscated CSS contest.

Then again, maybe it's machine-made and I'm old-fashioned expecting stuff like CSS to be human-readable. It's the rise of the Matrix! Beware the machines!

And I hate it when the miss the last semicolon off the end. There's no hope for me is there?

Advertisements

3 Responses to “Mental indentals”

  1. bloodhound Says:

    …well, sooooo few people hand-code anymore. I had become a slave to the DreamWeaver machine. Then, webdesign became boring without the tedious work of typing out your design in NotePad+… you have an addiction to a lost art…


  2. You're right of course. I wouldn't want to type a load of XML tags into Word to get it to print bold 12pt blue Verdana with a 1.2cm hanging indent, so why should I want to do it with CSS? No, I must stop worrying.

    I rather lament the days of having the code look nice as well as working well though, but it's only because that was my world for so long and now I must grow up, move on and learn new things and new ways.

    Thanks for that slap in the face. I feel better. I'll go and buy a Dreamweaver licence; I know it makes sense.


  3. […] I did the initial development with Firefox, tweaking the style sheet as I went, and when everything was ok in there, tried it out in IE6. That led to another day’s work tweaking the style sheet again (and some of the code) to get that looking similar, whilst simultaneously testing back in Firefox to make sure nothing was broken in the process. After that I tried Safari on the Mac, and although that worked well, it pointed up a couple of errors in the style sheet that the others had glossed over. […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: