1
0
mirror of https://github.com/thangisme/notes.git synced 2024-11-01 02:27:20 -04:00
notes/node_modules/stylelint/lib/rules/declaration-block-no-shorthand-property-overrides
Patrick Marsceill b7b0d0d7bf
Initial commit
2017-03-09 13:16:08 -05:00
..
index.js Initial commit 2017-03-09 13:16:08 -05:00
README.md Initial commit 2017-03-09 13:16:08 -05:00

declaration-block-no-shorthand-property-overrides

Disallow shorthand properties that override related longhand properties.

a { background-repeat: repeat; background: green; }
/**                            ↑
 * This overrides the longhand property before it */

In almost every case, this is just an authorial oversight. For more about this behavior, see MDN's documentation of shorthand properties.

Options

true

The following patterns are considered warnings:

a {
  padding-left: 10px;
  padding: 20px;
}
a {
  transition-property: opacity;
  transition: opacity 1s linear;
}
a {
  border-top-width: 1px;
  top: 0;
  bottom: 3px;
  border: 2px solid blue;
}

The following patterns are not considered warnings:

a { padding: 10px; padding-left: 20px; }
a { transition-property: opacity; } a { transition: opacity 1s linear; }
a { transition-property: opacity; -webkit-transition: opacity 1s linear; }