# stylus/pythonic

enforces pythonic or brace style.

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

# 📖 Rule Details

This rule enforces pythonic or brace style.

# 🔧 Options

{
  "stylus/pythonic": ["always" | "never",
    {
      "atblock": "always" | "never"
    }
  ]
}
  • Primary Option

    • "always" ... Requires pythonic style (i.e. indentation-based).
    • "never" ... Requires brace style.
  • Secondary Option (optional)

# "always"

// ✓ GOOD .foo color: red; bar = width: 20px; height: 20px; // ✗ BAD .foo { color: red; } bar = @block { width: 20px; height: 20px; }
Now loading...

# "never"

// ✓ GOOD .foo { color: red; } bar = @block { width: 20px; height: 20px; } // ✗ BAD .foo color: red; bar = width: 20px; height: 20px;
Now loading...

# [ "always", { "atblock": "never" } ]

// ✓ GOOD .foo color: red; bar = @block { width: 20px; height: 20px; } // ✗ BAD .foo { color: red; } bar = width: 20px; height: 20px;
Now loading...

# [ "never", { "atblock": "always" } ]

// ✓ GOOD .foo { color: red; } bar = width: 20px; height: 20px; // ✗ BAD .foo color: red; bar = @block { width: 20px; height: 20px; }
Now loading...

# 📚 Further reading

# 🔍 Implementation