ReSharper Help

Code Style Assistance

Some of ReSharper's code style assistance features (e.g. Code Formatting Rules, Code Cleanup) are also supported in CSS. You can find the detailed information on these features in the corresponding topics of the Code Style Assistance section. Besides, ReSharper provides a number of language-specific features in CSS.

In this topic:

Alphabetizing properties

ReSharper allows you to sort properties alphabetically within selector declarations. You can alphabetize properties using code cleanup with the Default: Full cleanup profile or with a custom profile where the Alphabetize properties option is selected in the CSS category.

Applying code cleanup

Consider the example below:

ReSharper_by_Language__CSS__Code_Cleanup_01
After applying code cleanup with the profile Default: Full cleanup and default settings, 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

Last modified: 21 September 2015