You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if i make the "formatted" string look like url("foo.png") instead of the current url(foo.png), then I could see that breaking people's existing tests (but it would "match" modern browsers more closely). If I just allow trailing/closing whitespace, and multiple urls, then that would be "more" backwards compatible I think.
I can work on this in the next few days and submit a PR. I have quite a few ideas on how to get it to work.
Thanks!
The text was updated successfully, but these errors were encountered:
It looks like chrome, ff, safari all return URLs in double quotes. I think if we did the work to support advanced syntax for this property it would make sense to make it match the return format also. That would be a backwards compatible API change and would have to be tagged accordingly.
it would be nice if url parsing worked like latest firefox/chrome.
for instance, running the following snippet in those browsers:
prints:
i've searched the code a bit, and think we can achieve this by modifying the following function:
cssstyle/lib/parsers.js
Lines 210 to 247 in f2db1eb
we can also add some better unit tests here:
cssstyle/lib/parsers.test.js
Lines 63 to 65 in f2db1eb
cssstyle/lib/CSSStyleDeclaration.test.js
Lines 377 to 385 in f2db1eb
if i make the "formatted" string look like
url("foo.png")
instead of the currenturl(foo.png)
, then I could see that breaking people's existing tests (but it would "match" modern browsers more closely). If I just allow trailing/closing whitespace, and multiple urls, then that would be "more" backwards compatible I think.I can work on this in the next few days and submit a PR. I have quite a few ideas on how to get it to work.
Thanks!
The text was updated successfully, but these errors were encountered: