Skip to content

stylus/at-rule-no-unknown

disallow unknown at-rules.

  • ⚙️ This rule is included in "stylelint-stylus/recommended" and "stylelint-stylus/standard". (options: true)

📖 Rule Details

This rule reports other than at-rules defined in the CSS specification and at-rules available in the Stylus standard.

❓ Why Not Use stylelint Rule

The at-rule-no-unknown rule incorrectly report errors in Stylus.
This problem is that the core rules do not understand at-rules of the Stylus.
The stylus/at-rule-no-unknown rule understands at-rules of the Stylus.

🔧 Options

See stylelint - at-rule-no-unknown - Options.

true

styl
/* stylelint rules config: {"stylus/at-rule-no-unknown": true} */
// ✓ GOOD
@media (max-width: 960px) {}
@media (max-width: 960px)
  .foo
    color red
@import "reset.css"
@css {
  .foo {}
}
.foo
  @extend .bar

// ✗ BAD
@unknown
{}
@unknown
"foo";
@unknown
.foo color red

🔍 Implementation