Skip to content

Commit

Permalink
Add tests for @keyframes nesting errors (#1979)
Browse files Browse the repository at this point in the history
  • Loading branch information
nex3 authored Apr 24, 2024
1 parent c64eb02 commit 4cded21
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 6 deletions.
45 changes: 45 additions & 0 deletions spec/css/keyframes.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -248,3 +248,48 @@ $a: b;
c: d;
}
}

<===>
================================================================================
<===> error/in_keyframe_block/style_rule/input.scss
@keyframes a {
to {to {c: d}}
}

<===> error/in_keyframe_block/style_rule/error
Error: Style rules may not be used within keyframe blocks.
,
2 | to {to {c: d}}
| ^^^^^^^^^
'
input.scss 2:7 root stylesheet

<===>
================================================================================
<===> error/in_keyframe_block/unknown_at_rule/input.scss
@keyframes a {
to {@b}
}

<===> error/in_keyframe_block/unknown_at_rule/error
Error: At-rules may not be used within keyframe blocks.
,
2 | to {@b}
| ^^
'
input.scss 2:7 root stylesheet

<===>
================================================================================
<===> error/in_keyframe_block/known_at_rule/input.scss
@keyframes a {
to {@media screen {b: c}}
}

<===> error/in_keyframe_block/known_at_rule/error
Error: At-rules may not be used within keyframe blocks.
,
2 | to {@media screen {b: c}}
| ^^^^^^^^^^^^^^^^^^^^
'
input.scss 2:7 root stylesheet
6 changes: 0 additions & 6 deletions spec/libsass/selectors/simple.hrx
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ div {
@-webkit-keyframes {
from {
left: 0px;
10% {
whatever: hoo;
}
}
to {
left: 200px;
Expand Down Expand Up @@ -57,9 +54,6 @@ div:nth(-3) {
@-webkit-keyframes {
from {
left: 0px;
10% {
whatever: hoo;
}
}
to {
left: 200px;
Expand Down

0 comments on commit 4cded21

Please sign in to comment.