I'm Stacking My CSS Properties!

September 12th, 2008

I’ve read many articles on design blogs recommending that you display your CSS properties in a single line. I’m choosing to disagree with all of them. What’s your preference? Do you prefer your properties in one-line or stacked?

Here is an example of how most CSS developers will recommend you code your style sheets:

#body {width:800px;margin:0;padding:0;font-size:12px;line-height:18px;}

I’m sorry but c’mon people this may result in a shorter style sheet but it is nearly impossible to read. As well, what if you are working off a style sheet that you didn’t create. For example, you are customizing a wordpress theme. It makes it even harder to find what you are looking for.

My preference, and how I code all my style sheets, is to stack the properties as shown below:

#body {
width: 800px;
margin: 0;
padding: 0;
font-size: 12px;
line-height: 18px;
}

I don’t understand how you can make an arguement for properties in one-line. Stacking your properties is obviously a way easier way to read your code. Join me in stacking your CSS properties!

Print This Post Print This Post

Theme Forest

Share this post

  • Twitter
  • Facebook
  • Delicious

2 Comments on “I'm Stacking My CSS Properties!”

admin

What’s your preference? Stacked or one-line?

September 12, 2008 » 2:37 pm

admin

test

September 13, 2008 » 3:53 pm