# css/no-length-zero-unit

disallow units for zero lengths

  • ⚙️ This rule is included in "plugin:css/standard".
  • 🔧 The --fix option on the command line (opens new window) can automatically fix some of the problems reported by this rule.

# 📖 Rule Details

This rule reports a length of 0 with unit.

This rule was inspired by Stylelint's length-zero-no-unit rule (opens new window).

Now loading...

# 🔧 Options

{
  "css/no-length-zero-unit": ["error", {
    "ignoreProperties": [],
    "ignoreFunctions": [],
    "ignoreCustomProperties": false,
  }]
}
  • ignoreProperties ... You can specify property names or patterns that you want to ignore from checking.
  • ignoreFunctions ... You can specify function names or patterns that you want to ignore from checking.
  • ignoreCustomProperties ... If true, ignores custom properties from checking. Default is false.

# 📚 Further reading

# 🚀 Version

This rule was introduced in eslint-plugin-css v0.1.0

# 🔍 Implementation

Last Updated: 2/13/2024, 12:55:19 AM