Skip to content

stylus/declaration-colon

require or disallow declaration colons.

  • ⚙️ This rule is included in "stylelint-stylus/standard". (options: "never")
  • 🔧 The fix option can automatically fix some of the problems reported by this rule.

📖 Rule Details

This rule require or disallow declaration colons.

🔧 Options

json
{
  "stylus/declaration-colon": ["always" | "never"]
}
  • "always" ... Requires one colon.
  • "never" ... Disallows colons.

"always"

styl
/* stylelint rules config: {"stylus/declaration-colon": "always"} */
a
  // ✓ GOOD
  color: red
  // ✗ BAD
  color
red

"never"

styl
/* stylelint rules config: {"stylus/declaration-colon": "never"} */
a
  // ✓ GOOD
  color red
  // ✗ BAD
  color
:
red

📚 Further reading

🔍 Implementation