Skip to content

Commit

Permalink
Detect use of 'initial', 'unset', and 'revert' keywords
Browse files Browse the repository at this point in the history
Fixes anandthakker#56

As IE11 does not support 'initial' and 'unset', and 'revert' is not
yet supported by pretty much any browser, detecting their usage is
valuable to developers and would allow linters to warn about it.
  • Loading branch information
rincedd committed Sep 13, 2018
1 parent 8da2edf commit 32be7a2
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
12 changes: 12 additions & 0 deletions data/features.js
Original file line number Diff line number Diff line change
Expand Up @@ -391,5 +391,17 @@ module.exports = {
'css-image-set': {
properties: [''],
values: ['image-set']
},
'css-initial-value': {
properties: [''],
values: ['initial']
},
'css-unset-value': {
properties: [''],
values: ['unset']
},
'css-revert-value': {
properties: [''],
values: ['revert']
}
}
18 changes: 18 additions & 0 deletions test/cases/inheritance-keywords.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/*
expect:
css-initial-value: 1
css-unset-value: 1
css-revert-value: 1
*/

.initial-value {
color: initial;
}

.unset-value {
color: unset;
}

.revert-value {
color: revert;
}

0 comments on commit 32be7a2

Please sign in to comment.