|
case ";": |
|
switch (state) { |
|
case "value": |
|
styleRule.style.setProperty(name, buffer.trim(), priority); |
|
priority = ""; |
|
buffer = ""; |
|
state = "before-name"; |
|
break; |
|
case "atRule": |
|
buffer = ""; |
|
state = "before-selector"; |
|
break; |
|
case "importRule": |
|
importRule = new CSSOM.CSSImportRule(); |
|
importRule.parentStyleSheet = importRule.styleSheet.parentStyleSheet = styleSheet; |
|
importRule.cssText = buffer + character; |
|
styleSheet.cssRules.push(importRule); |
|
buffer = ""; |
|
state = "before-selector"; |
|
break; |
|
default: |
|
buffer += character; |
|
break; |
|
} |
|
break; |
|
|
This fails for import rules for fonts which have multiple font weights.
Example :- @import url(https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@300;400&display=swap);
I get the error:- ")" not found.
I am guessing it's due to semicolon being encountered first before closing the bracket.
CSSOM/lib/parse.js
Lines 333 to 358 in a469aae
This fails for import rules for fonts which have multiple font weights.
Example :- @import url(https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@300;400&display=swap);
I get the error:- ")" not found.
I am guessing it's due to semicolon being encountered first before closing the bracket.