Skip to content

Commit

Permalink
Fix doc of rule "prefer-shorthand-css-notations"
Browse files Browse the repository at this point in the history
  • Loading branch information
utarwyn committed Dec 11, 2023
1 parent d97ed0d commit 83e669a
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions eslint-plugin/docs/rules/prefer-shorthand-css-notations.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,26 @@ ultimately conserving time and energy.
By reducing the number of CSS properties, you help to reduce the weight of your application bundle, and therefore its
environmental footprint.

## Options

You can disable specific properties from being scanned if it does not match your needs.
To disable properties you need to modify your .eslintrc.js by adding the following rule configuration:

```js
module.exports = {
...yourConf,
rules: {
"prefer-shorthand-css-notations": [
"warn",
// disable analyze of "animation-*" properties
{ disableProperties: ["animation"] },
],
},
};
```

## Examples

For example, the `font` shorthand consolidates various font-related properties, and the `margin` shorthand streamlines
the definition of margins around a box.

Expand Down

0 comments on commit 83e669a

Please sign in to comment.