Skip to content


require or disallow a leading zero for fractional numbers less than 1

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

📖 Rule Details

This rule aims to consistently require or disallow leading zeros for fractional numbers less than one.

This rule was inspired by Stylelint's number-leading-zero rule.

Now loading...

🔧 Options

  "css/number-leading-zero": ["error",
    "always" // or "never"
  • "always" ... Require always have leading zero. This is default.
  • "never" ... Disallow leading zero.

📚 Further reading

🚀 Version

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

🔍 Implementation