ReSharper 8.0 Web Help

ReSharper reformats CSS code according to the settings specified in the following tabs:

  • ReSharper | Options | Code Editing | CSS | Formatting Style | Code Layout
  • ReSharper | Options | Code Editing | CSS | Formatting Style | Line Breaks
  • ReSharper | Options | Code Editing | CSS | Formatting Style | Spaces
ReSharper_by_Language__CSS__Code_Cleanup__Formatting_Style

You can specify settings that fit your code style and simplify visual perception. After that, run Code Cleanup to reformat code in a particular file or all files automatically.

Full Cleanup vs Reformat Code

Action Full Cleanup Reformat Code

Alphabetize properties

feature_available

feature_not_available

Reformat code

feature_available

feature_available

Consider the example below:

ReSharper_by_Language__CSS__Code_Cleanup_01

After applying Code Cleanup, declarations are split with line breaks. If a declaration contains several properties, they are placed on separate lines and sorted alphabetically. If there is only one, then - on the same line, etc.

ReSharper_by_Language__CSS__Code_Cleanup_02

See Also

Procedures: