Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 72617
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T20:04:22+00:00 2026-05-10T20:04:22+00:00

Eric Meyer’s advice to keep individual rules alphabetized in a CSS style definition makes

  • 0

Eric Meyer’s advice to keep individual rules alphabetized in a CSS style definition makes sense – there’s no "natural" way to order rules, and this makes it easy in a complex definition to make sure you don’t define the same thing twice.

div.Foo {     background:Green;     border:1px solid Khaki;     display:none;     left:225px;     max-height:300px;     overflow-x:hidden;     overflow-y:auto;     position:absolute;     top:0;     width:230px;     z-index:99; } 

So my question: Is there a plugin or some other easy way to select a list of rules in Visual Studio and alphabetize them? (Better yet, to apply this throughout a stylesheet in one fell swoop.)

Update

@Geoff suggests CleanCSS, which is very cool and will do the above-requested alphabetization all at once, in addition to a lot of other nice clean-up (e.g. merging definitions with the same selector). Unfortunately it collapses multiple selectors in a definition into a single line. For example

div.Foo, div.Foo p, div.Foo li {    color:Green; } 

becomes

div.Foo,div.Foo p,div.Foo li {    color:Green; } 

which is much harder to read and kind of a deal-breaker. This is with the lowest compression setting, and I don’t see a way to override it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T20:04:22+00:00Added an answer on May 10, 2026 at 8:04 pm

    I don’t know of anything in visual studio, but there online tools to clean up and format css. I’ve used CleanCSS with success

    Update:

    Try this one Format CSS Online. It seems to output the lines more like you want

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Inspired by Eric Sink's interview on the stackoverflow podcast I would like to build
Few months ago, I have came across a Silverlight tutorial of Eric Cartman (South
I'm trying to remember the correct notation for doing find-replace regex matches in Java.
Since this question is about the increment operator and speed differences with prefix/postfix notation,
I am trying to create a script that will self update when it detects
I have libTestLibrary.so library and I want add it to Android-emulator's lib folder. How
If from the page localhost:nnnn/Class I click on an AJAX link that will post
I want to have a message send & receive through 2 uni-direction FIFO Flow
I'm trying to do something that I can't really find any help on. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.