Skip to content

CSS Rules

Below the list of rules supported by Biome, divided by group. Here’s a legend of the emojis:

  • The icon indicates that the rule is part of the recommended rules.
  • The icon indicates that the rule provides a code action (fix) that is safe to apply.
  • The icon indicates that the rule provides a code action (fix) that is unsafe to apply.
  • The icon indicates that the rule is currently only available in the 2.0 beta release.
Rule nameDescriptionProperties
useGenericFontNamesDisallow a missing generic family keyword within font families.
Rule nameDescriptionProperties
noInvalidDirectionInLinearGradientDisallow non-standard direction values for linear gradient functions.
noInvalidGridAreasDisallows invalid named grid areas in CSS Grid Layouts.
noInvalidPositionAtImportRuleDisallow the use of @import at-rules in invalid positions.
noUnknownFunctionDisallow unknown CSS value functions.
noUnknownMediaFeatureNameDisallow unknown media feature names.
noUnknownPropertyDisallow unknown properties.
noUnknownUnitDisallow unknown CSS units.
noUnmatchableAnbSelectorDisallow unmatchable An+B selectors.
Rule nameDescriptionProperties
noDescendingSpecificityDisallow a lower specificity selector from coming after a higher specificity selector.
noDuplicateCustomPropertiesDisallow duplicate custom properties within declaration blocks.
noDuplicatePropertiesDisallow duplicate properties within declaration blocks.
noIrregularWhitespaceDisallows the use of irregular whitespace characters.
noMissingVarFunctionDisallow missing var function for css variables.
noUnknownAtRuleDisallow unknown at-rules.
noUnknownPseudoClassDisallow unknown pseudo-class selectors.
noUnknownPseudoElementDisallow unknown pseudo-element selectors.
noUnknownTypeSelectorDisallow unknown type selectors.
noUselessEscapeInStringDisallow unnecessary escapes in string literals.
noValueAtRuleDisallow use of @value rule in css modules.
Rule nameDescriptionProperties
noDuplicateAtImportRulesDisallow duplicate @import rules.
noDuplicateFontNamesDisallow duplicate names within font families.
noDuplicateSelectorsKeyframeBlockDisallow duplicate selectors within keyframe blocks.
noEmptyBlockDisallow CSS empty blocks.
noImportantInKeyframeDisallow invalid !important within keyframe declarations
noShorthandPropertyOverridesDisallow shorthand properties that override related longhand properties.