We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
From https://bugs.webkit.org/show_bug.cgi?id=268742:
const style = document.createElement('style') document.body.append(style) style.sheet.insertRule(`h6 { background: url(/my-image.png), var(--my-image); }`) console.log(style.sheet.cssRules[0].cssText)
Safari outputs:
h6 { background: url(\/my-image\.png), var(--my-image); }
Chrome and Firefox outputs:
h6 { background: url(/my-image.png), var(--my-image); }
Per spec, cssText returns "a serialization of the CSS rule".
cssText
A URL is serialized as '"url(", followed by the serialization of the URL as a string, followed by ")"', which implies the above should be url("/my-image.png"), contrary to all major browsers.
url("/my-image.png")
The text was updated successfully, but these errors were encountered:
If I am not mistaken, Chrome and FF serialize the original input string for values containing arbitrary substitutions like var() (cf. #6484).
var()
Sorry, something went wrong.
No branches or pull requests
From https://bugs.webkit.org/show_bug.cgi?id=268742:
Safari outputs:
Chrome and Firefox outputs:
Per spec,
cssText
returns "a serialization of the CSS rule".A URL is serialized as '"url(", followed by the serialization of the URL as a string, followed by ")"', which implies the above should be
url("/my-image.png")
, contrary to all major browsers.The text was updated successfully, but these errors were encountered: