Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"@types/testing-library__jest-dom": "^5.9.1",
"aria-query": "^5.0.0",
"chalk": "^3.0.0",
"css": "^3.0.0",
"@adobe/css-tools": "^4.0.0",
"css.escape": "^1.5.1",
"dom-accessibility-api": "^0.5.6",
"lodash": "^4.17.15",
Expand Down
4 changes: 2 additions & 2 deletions src/utils.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import redent from 'redent'
import cssParse from 'css/lib/parse'
import {parse} from '@adobe/css-tools/dist/cjs/cssTools'
import isEqual from 'lodash/isEqual'

class GenericTypeError extends Error {
Expand Down Expand Up @@ -100,7 +100,7 @@ class InvalidCSSError extends Error {
}

function parseCSS(css, ...args) {
const ast = cssParse(`selector { ${css} }`, {silent: true}).stylesheet
const ast = parse(`selector { ${css} }`, {silent: true}).stylesheet

if (ast.parsingErrors && ast.parsingErrors.length > 0) {
const {reason, line} = ast.parsingErrors[0]
Expand Down