Skip to content

Commit

Permalink
Change alpha-value-notation to be "number"`for opacity property (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeddy3 committed Nov 14, 2021
1 parent 6ed9280 commit c774fdd
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,9 @@
# Changelog

## 24.0.0

- Changed: `alpha-value-notation` to be `"number"` for `opacity` property.

## 23.0.0

This release adds over a dozen new rules.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -93,8 +93,8 @@ To see the rules that this config uses, please read the [config itself](./index.
}

@keyframes fade-in {
from { opacity: 0%; }
to { opacity: 100%; }
from { opacity: 0; }
to { opacity: 1; }
}
```

Expand Down
4 changes: 2 additions & 2 deletions __tests__/valid.css
Expand Up @@ -74,6 +74,6 @@
}

@keyframes fade-in {
from { opacity: 0%; }
to { opacity: 100%; }
from { opacity: 0; }
to { opacity: 1; }
}
7 changes: 6 additions & 1 deletion index.js
Expand Up @@ -3,7 +3,12 @@
module.exports = {
extends: 'stylelint-config-recommended',
rules: {
'alpha-value-notation': 'percentage',
'alpha-value-notation': [
'percentage',
{
exceptProperties: ['opacity'],
},
],
'at-rule-empty-line-before': [
'always',
{
Expand Down

0 comments on commit c774fdd

Please sign in to comment.