Skip to content

Latest commit

 

History

History
176 lines (136 loc) · 1.68 KB

property-case.md

File metadata and controls

176 lines (136 loc) · 1.68 KB

Pattern: Malformed property case

Issue: -

Description

Specify lowercase or uppercase for properties.

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

Examples

string: "lower"|"upper"

"lower"

The following patterns are considered problems:

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 problems:

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 problems:

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 problems:

a {
  WIDTH: 1px
}
a {
  BORDER-RADIUS: 5px;
}
a {
  -WEBKIT-ANIMATION-DURATION: 3s;
}
@media screen and (orientation: landscape) {
  WIDTH: 500px;
}

Configuration

ignoreSelectors: ["/regex/", /regex/, "string"]

Given:

[
  "lower",
  {
    "ignoreSelectors": [":export"]
  }
]

The following patterns are not considered problems:

:export {
  camelCase: value;
}

Further Reading