Skip to content

Commit d5e143f

Browse files
committed
Add --name rule for keyframes to mark by -- all user-defined tokens
1 parent 75f7305 commit d5e143f

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ module.exports = {
1515
'function-disallowed-list': ['rgba', 'hsla'],
1616
'color-function-notation': 'modern',
1717
'no-irregular-whitespace': null,
18+
'keyframes-name-pattern': [
19+
'^--([a-z][a-z0-9]*)(-[a-z0-9]+)*$',
20+
{
21+
message: name => `Expected keyframe name ${name} to be --kebab-case`
22+
}
23+
],
1824
'selector-class-pattern': null,
1925
'alpha-value-notation': 'number',
2026
'function-url-quotes': null,

test/example.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
.block_element.is-mod {
22
display: block;
33
background: oklch(0% 0 0);
4+
animation: --rotating 1s linear infinite;
5+
}
6+
7+
@keyframes --rotating {
8+
100% {
9+
rotate: 360deg;
10+
}
411
}

0 commit comments

Comments
 (0)