Visual Studio CSS Formatting… nice!!

 

Now that I’m back doing alot of CSS i came across a post describing the CSS formatting feature in visual studio…

My preference is for single line css. I dont like to expand to one line per rule, thats just my personal preference. But it can be a pain to maintain.

Enter visual studio:

here’s some code i had….

 

body
  {
      background: #123;
      border-top: 5px solid #000;
      color: #333;
      font-size: 11px;
      padding: 20px 0 40px;
  }
  a
  {
      color: #fff;
      text-decoration: none;
  }
  a:hover
  {
      text-decoration: underline;
  }
  h1
  {
      font-family: Georgia, serif;
      font-weight: normal;
      text-align: center;
  }

and with a quick Format!!!

body { background: #123; border-top: 5px solid #000; color: #333; font-size: 11px; padding: 20px 0 40px; }
a { color: #fff; text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-family: Georgia, serif; font-weight: normal; text-align: center; }

nice….

 

now if only the formatter would make the rules alphabetical !!!!

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 )

Connecting to %s