ReSharper 2023.1 Help

Code Inspections in CSS

In CSS, ReSharper 2023.1 provides 22 proprietary code inspections, any of which you can disable or change its severity level.
These code inspections help you detect code issues in design time in all open files, and additionally they allow you to find code issues in specific scope.

Configurable CSS inspections are listed below, grouped by their categories.

Common Practices and Code Improvements (1 inspection)

This category groups inspections that hunt for medium severity issues that mainly affect code readability.

Inspection


ID


EditorConfig property

Default severity

Two colons preferred


DoubleColonsPreferred


resharper_double_colons_preferred_highlighting

Suggestion

Potential Code Quality Issues (17 inspections)

This category includes inspections that detect critical issues (code smells), mostly with Error or Warning level. This category also includes inspections that ensure localization assistance.

Inspection


ID


EditorConfig property

Default severity

Cannot resolve file system path


PathNotResolved


resharper_path_not_resolved_highlighting

Error

CSS feature is not supported by specific browsers


CssCaniuseUnsupportedFeature


resharper_css_caniuse_unsupported_feature_highlighting

Hint

CSS feature requires vendor prefix for specific browsers


CssCaniuseFeatureRequiresPrefix


resharper_css_caniuse_feature_requires_prefix_highlighting

Hint

CSS symbol / syntax is not compatible with specific browsers


CssBrowserCompatibility


resharper_css_browser_compatibility_highlighting

Warning

CSS symbol is obsolete


CssObsolete


resharper_css_obsolete_highlighting

Hint

Invalid hexadecimal value of color


HexColorValueWithAlpha


resharper_hex_color_value_with_alpha_highlighting

Error

Invalid value


InvalidValue


resharper_invalid_value_highlighting

Error

Property does not override vendor-prefixed property


CssPropertyDoesNotOverrideVendorProperty


resharper_css_property_does_not_override_vendor_property_highlighting

Warning

Requires fallback color


RequiresFallbackColor


resharper_requires_fallback_color_highlighting

Warning

Syntax is not allowed in specified CSS version


SyntaxIsNotAllowed


resharper_syntax_is_not_allowed_highlighting

Warning

Two colons expected


DoubleColonsExpected


resharper_double_colons_expected_highlighting

Error

Unknown CSS class


UnknownCssClass


resharper_unknown_css_class_highlighting

Warning

Unknown CSS symbol


CssNotResolved


resharper_css_not_resolved_highlighting

Error

Unknown custom property


UnknownCssVariable


resharper_unknown_css_variable_highlighting

Warning

Unknown vendor-specific extension


UnknownCssVendorExtension


resharper_unknown_css_vendor_extension_highlighting

Hint

Value is unexpected


UnexpectedValue


resharper_unexpected_value_highlighting

Error

Value should have units


ValueShouldHaveUnits


resharper_value_should_have_units_highlighting

Error

Redundancies in Code (3 inspections)

Code inspections in this category look for redundancies and dead code, which affect code readability and style, and could be safely removed. Some code redundancies cannot be fixed automatically, and quick-fixes for them are performed in the interactive mode, requiring the user input. But the majority of the redundancies can be fixed without user interaction, using either fix in scope or code cleanup.

Inspection


ID


EditorConfig property

Default severity

Redundant code


Redundant


resharper_redundant_highlighting

Warning

Redundant CSS hack


RedundantCssHack


resharper_redundant_css_hack_highlighting

Warning

Redundant measure unit


RedundantUnits


resharper_redundant_units_highlighting

Warning

Redundancies in Symbol Declarations (1 inspection)

This category includes code inspections, mostly with the warning severity level, which detect empty and unused symbol declarations.

Inspection


ID


EditorConfig property

Default severity

Declaration is empty


DeclarationIsEmpty


resharper_declaration_is_empty_highlighting

Warning

Last modified: 27 March 2023