stylelint
  • User guide
  • Rules
  • Plugins
  • Developer guide
  • Demo
  • GitHub
  • Twitter

›Rules

Overview

  • Home
  • Vision
  • Changelog
  • Contributing

For users

  • User guide
  • FAQ
  • About rules
  • Semantic versioning policy
  • Configuration
  • Rules
  • Plugins
  • Processors
  • Example config
  • CSS processors
  • Command Line Interface (CLI)
  • The stylelint Node.js API
  • The stylelint PostCSS plugin
  • Complementary tools
  • Articles

Rules

  • at-rule-blacklist
  • at-rule-empty-line-before
  • at-rule-name-case
  • at-rule-name-newline-after
  • at-rule-name-space-after
  • at-rule-no-unknown
  • at-rule-no-vendor-prefix
  • at-rule-property-requirelist
  • at-rule-semicolon-newline-after
  • at-rule-semicolon-space-before
  • at-rule-whitelist
  • block-closing-brace-empty-line-before
  • block-closing-brace-newline-after
  • block-closing-brace-newline-before
  • block-closing-brace-space-after
  • block-closing-brace-space-before
  • block-no-empty
  • block-opening-brace-newline-after
  • block-opening-brace-newline-before
  • block-opening-brace-space-after
  • block-opening-brace-space-before
  • color-hex-case
  • color-hex-length
  • color-named
  • color-no-hex
  • color-no-invalid-hex
  • comment-empty-line-before
  • comment-no-empty
  • comment-whitespace-inside
  • comment-word-blacklist
  • custom-media-pattern
  • custom-property-empty-line-before
  • custom-property-pattern
  • declaration-bang-space-after
  • declaration-bang-space-before
  • declaration-block-no-duplicate-properties
  • declaration-block-no-redundant-longhand-properties
  • declaration-block-no-shorthand-property-overrides
  • declaration-block-semicolon-newline-after
  • declaration-block-semicolon-newline-before
  • declaration-block-semicolon-space-after
  • declaration-block-semicolon-space-before
  • declaration-block-single-line-max-declarations
  • declaration-block-trailing-semicolon
  • declaration-colon-newline-after
  • declaration-colon-space-after
  • declaration-colon-space-before
  • declaration-empty-line-before
  • declaration-no-important
  • declaration-property-unit-blacklist
  • declaration-property-unit-whitelist
  • declaration-property-value-blacklist
  • declaration-property-value-whitelist
  • font-family-name-quotes
  • font-family-no-duplicate-names
  • font-family-no-missing-generic-family-keyword
  • font-weight-notation
  • function-blacklist
  • function-calc-no-invalid
  • function-calc-no-unspaced-operator
  • function-comma-newline-after
  • function-comma-newline-before
  • function-comma-space-after
  • function-comma-space-before
  • function-linear-gradient-no-nonstandard-direction
  • function-max-empty-lines
  • function-name-case
  • function-parentheses-newline-inside
  • function-parentheses-space-inside
  • function-url-no-scheme-relative
  • function-url-quotes
  • function-url-scheme-blacklist
  • function-url-scheme-whitelist
  • function-whitelist
  • function-whitespace-after
  • indentation
  • keyframe-declaration-no-important
  • keyframes-name-pattern
  • length-zero-no-unit
  • linebreaks
  • max-empty-lines
  • max-line-length
  • max-nesting-depth
  • media-feature-colon-space-after
  • media-feature-colon-space-before
  • media-feature-name-blacklist
  • media-feature-name-case
  • media-feature-name-no-unknown
  • media-feature-name-no-vendor-prefix
  • media-feature-name-value-whitelist
  • media-feature-name-whitelist
  • media-feature-parentheses-space-inside
  • media-feature-range-operator-space-after
  • media-feature-range-operator-space-before
  • media-query-list-comma-newline-after
  • media-query-list-comma-newline-before
  • media-query-list-comma-space-after
  • media-query-list-comma-space-before
  • no-descending-specificity
  • no-duplicate-at-import-rules
  • no-duplicate-selectors
  • no-empty-first-line
  • no-empty-source
  • no-eol-whitespace
  • no-extra-semicolons
  • no-invalid-double-slash-comments
  • no-missing-end-of-source-newline
  • no-unknown-animations
  • number-leading-zero
  • number-max-precision
  • number-no-trailing-zeros
  • property-blacklist
  • property-case
  • property-no-unknown
  • property-no-vendor-prefix
  • property-whitelist
  • rule-empty-line-before
  • selector-attribute-brackets-space-inside
  • selector-attribute-operator-blacklist
  • selector-attribute-operator-space-after
  • selector-attribute-operator-space-before
  • selector-attribute-operator-whitelist
  • selector-attribute-quotes
  • selector-class-pattern
  • selector-combinator-blacklist
  • selector-combinator-space-after
  • selector-combinator-space-before
  • selector-combinator-whitelist
  • selector-descendant-combinator-no-non-space
  • selector-id-pattern
  • selector-list-comma-newline-after
  • selector-list-comma-newline-before
  • selector-list-comma-space-after
  • selector-list-comma-space-before
  • selector-max-attribute
  • selector-max-class
  • selector-max-combinators
  • selector-max-compound-selectors
  • selector-max-empty-lines
  • selector-max-id
  • selector-max-pseudo-class
  • selector-max-specificity
  • selector-max-type
  • selector-max-universal
  • selector-nested-pattern
  • selector-no-qualifying-type
  • selector-no-vendor-prefix
  • selector-pseudo-class-blacklist
  • selector-pseudo-class-case
  • selector-pseudo-class-no-unknown
  • selector-pseudo-class-parentheses-space-inside
  • selector-pseudo-class-whitelist
  • selector-pseudo-element-blacklist
  • selector-pseudo-element-case
  • selector-pseudo-element-colon-notation
  • selector-pseudo-element-no-unknown
  • selector-pseudo-element-whitelist
  • selector-type-case
  • selector-type-no-unknown
  • shorthand-property-no-redundant-values
  • string-no-newline
  • string-quotes
  • time-min-milliseconds
  • unicode-bom
  • unit-blacklist
  • unit-case
  • unit-no-unknown
  • unit-whitelist
  • value-keyword-case
  • value-list-comma-newline-after
  • value-list-comma-newline-before
  • value-list-comma-space-after
  • value-list-comma-space-before
  • value-list-max-empty-lines
  • value-no-vendor-prefix

For developers

  • Developer guide
  • Prerequisites to contributing
  • Working on rules
  • Writing plugins
  • Writing processors
  • Writing formatters
  • Performing releases
  • Reviewing pull requests
  • Managing issues
Edit

property-case

Specify lowercase or uppercase for properties.

    a { width: 1px; }
/**     ↑
 * This property */

The --fix option on the command line can automatically fix all of the problems reported by this rule.

Options

string: "lower"|"upper"

"lower"

The following patterns are considered violations:

a {
  Width: 1px
}
a {
  WIDTH: 1px
}
a {
  widtH: 1px
}
a {
  border-Radius: 5px;
}
a {
  -WEBKIT-animation-duration: 3s;
}
@media screen and (orientation: landscape) {
  WiDtH: 500px;
}

The following patterns are not considered violations:

a {
  width: 1px
}
a {
  border-radius: 5px;
}
a {
  -webkit-animation-duration: 3s;
}
@media screen and (orientation: landscape) {
  width: 500px;
}

"upper"

The following patterns are considered violations:

a {
  Width: 1px
}
a {
  width: 1px
}
a {
  widtH: 1px
}
a {
  border-Radius: 5px;
}
a {
  -WEBKIT-animation-duration: 3s;
}
@media screen and (orientation: landscape) {
  WiDtH: 500px;
}

The following patterns are not considered violations:

a {
  WIDTH: 1px
}
a {
  BORDER-RADIUS: 5px;
}
a {
  -WEBKIT-ANIMATION-DURATION: 3s;
}
@media screen and (orientation: landscape) {
  WIDTH: 500px;
}
← property-blacklistproperty-no-unknown →
  • Options
    • "lower"
    • "upper"
Copyright © 2019 stylelint