Skip to content

Commit 26600df

Browse files
committed
fix: update css-parser to format keyframes selectors
1 parent b2d3563 commit 26600df

File tree

4 files changed

+23
-5
lines changed

4 files changed

+23
-5
lines changed

index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
ATTR_FLAG_CASE_INSENSITIVE,
1111
ATTR_FLAG_CASE_SENSITIVE,
1212
NODE_TYPES as NODE,
13+
DIMENSION,
1314
} from '@projectwallace/css-parser'
1415

1516
const SPACE = ' '

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,6 @@
6060
"singleQuote": true
6161
},
6262
"dependencies": {
63-
"@projectwallace/css-parser": "^0.12.2"
63+
"@projectwallace/css-parser": "^0.12.3"
6464
}
6565
}

test/selectors.test.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,23 @@ test(`formats ::highlight and ::highlight(Name) correctly`, () => {
214214
expect(actual).toEqual(expected)
215215
})
216216

217+
test('formats keyframes selectors (50%) correctly', () => {
218+
let actual = format(
219+
`@keyframes Toastify__bounceInUp { 0% {animation-timing-function: cubic-bezier(.215, .61, .355, 1);} 50% {} 80%,to {} }`,
220+
)
221+
let expected = `@keyframes Toastify__bounceInUp {
222+
0% {
223+
animation-timing-function: cubic-bezier(.215, .61, .355, 1);
224+
}
225+
226+
50% {}
227+
228+
80%,
229+
to {}
230+
}`
231+
expect(actual).toBe(expected)
232+
})
233+
217234
test('formats unknown pseudos correctly', () => {
218235
let actual = format(`
219236
::foo-bar,

0 commit comments

Comments
 (0)