Skip to content

Commit e9ddde5

Browse files
committed
Support unquoted data URLs
Takes care of cases like `background: url(data:image/png;base64,...)`. It is valid CSS to define URLs without quotes (`url(xxx)`) so the example above is perfectly valid CSS.
1 parent dc5928c commit e9ddde5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ module.exports = function(css){
112112
if (!match(/^:\s*/)) return;
113113

114114
// val
115-
var val = match(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|[^};])+)\s*/);
115+
var val = match(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)\s*/);
116116
if (!val) return;
117117
val = val[0].trim();
118118

0 commit comments

Comments
 (0)