File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -86,13 +86,16 @@ function parseImportParams(params: ValueParser.ValueAstNode[]) {
8686 continue
8787 }
8888
89- if ( node . kind === 'function' && / ^ u r l $ / i . test ( node . value ) ) {
89+ if ( node . kind === 'function' && node . value . toLowerCase ( ) === 'url' ) {
9090 throw new Error ( 'url functions are not supported' )
9191 }
9292
9393 if ( ! uri ) throw new Error ( 'Unable to find uri' )
9494
95- if ( ( node . kind === 'word' || node . kind === 'function' ) && / ^ l a y e r $ / i. test ( node . value ) ) {
95+ if (
96+ ( node . kind === 'word' || node . kind === 'function' ) &&
97+ node . value . toLowerCase ( ) === 'layer'
98+ ) {
9699 if ( layer ) throw new Error ( 'Multiple layers' )
97100 if ( supports ) throw new Error ( 'layers must be defined before support conditions' )
98101
@@ -105,7 +108,7 @@ function parseImportParams(params: ValueParser.ValueAstNode[]) {
105108 continue
106109 }
107110
108- if ( node . kind === 'function' && / ^ s u p p o r t s $ / i . test ( node . value ) ) {
111+ if ( node . kind === 'function' && node . value . toLowerCase ( ) === 'supports' ) {
109112 if ( supports ) throw new Error ( 'Multiple support conditions' )
110113 supports = ValueParser . toCss ( node . nodes )
111114 continue
You can’t perform that action at this time.
0 commit comments