Skip to content

Commit

Permalink
Add --name rule for keyframes to mark by -- all user-defined tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Jun 8, 2024
1 parent 75f7305 commit d5e143f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ module.exports = {
'function-disallowed-list': ['rgba', 'hsla'],
'color-function-notation': 'modern',
'no-irregular-whitespace': null,
'keyframes-name-pattern': [
'^--([a-z][a-z0-9]*)(-[a-z0-9]+)*$',
{
message: name => `Expected keyframe name ${name} to be --kebab-case`
}
],
'selector-class-pattern': null,
'alpha-value-notation': 'number',
'function-url-quotes': null,
Expand Down
7 changes: 7 additions & 0 deletions test/example.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
.block_element.is-mod {
display: block;
background: oklch(0% 0 0);
animation: --rotating 1s linear infinite;
}

@keyframes --rotating {
100% {
rotate: 360deg;
}
}

0 comments on commit d5e143f

Please sign in to comment.