1

As per the Google style guide (but this is a generally recognized as good practice) the CSS declarations should be sorted within rules blocks.

So given the following code:

.ruleOne {
  width: 40px;
  text-align: center;
  background-color: blue;
}

 .ruleTwo {
  position: relative;
  width: 40px;
  background-color: red;
}

What would be a good way (keyboard macro, defun, etc.) to end up with this?

.ruleOne {
  background-color: blue;
  text-align: center;
  width: 40px;
}

 .ruleTwo {
  background-color: red;
  position: relative;
  width: 40px;
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.