-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
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
Stylus url is a function, and it sets its own quote style #4
Stylus url is a function, and it sets its own quote style #4
Comments
It appears something like this might be desirable:
In the form styles |
Today, the
|
@cjpatoilo It does not appear anything has changed in the Form.styl source since I filed this bug. Are you seeing that the quote behavior from the Stylus library has changed? |
@cjpatoilo I see the changes that you've made now, but the problem is still present, and results from the presence of double quotes in the SVG image. See an updated example and look at the quote nesting in background-image (double quotes nested in double quotes). The workaround I suggested was to swap the quotes, but escaping the quotes would probably work. |
@michaek Maybe I didn't understand you. Can you help Milligram to fix it? |
Is the code you use to generate the Stylus version public? I've already given the example of how to fix it in the Stylus version, but if that's going to get overwritten every time there's an update it seems like the wrong place for a fix. :) |
I'm willing to help, once it's clear where to make the fix. This issue should be reopened in the meantime. |
@michaek Please, review this example. |
Hi, @cjpatoilo. The example you provided contains the same issue: |
Found this report on Stylus: stylus/stylus#2243 A maintainer marked it as a bug, but it doesn't look like it's going anywhere. Since you're handling just a small number of known cases, I would just swap the SVG quotes with single quotes - that's what I've done where I use milligram-stylus. |
You might use https://github.com/tigt/mini-svg-data-uri (source) to encode the SVGs for all language destinations, though I'm not sure what browsers, if any, are impacted by not url encoding angle brackets. |
For me work okay. Let me show you: |
For now, I decided to launch Please, let me know if you find one way to print the variable |
@cjpatoilo The image above doesn't show the quote style of the SVGs, so it's hard to know whether you're reproducing the issue or not. At the very least, I can see that Stylus has turned your It looks like the most recent release (1.4.1) is still nesting double quotation marks (in the SVG) within single quotation marks (in the |
Version info
Milligram:
1.3.0
Test case
Example stylus svg background
Steps to reproduce
Compile milligram-stylus.
Expected behavior
Arrows should be present in select elements. (Ideally, the color variable should be interpolated in the SVG string.)
Actual behavior
No arrows in select elements, because quotes are nested incorrectly.
The text was updated successfully, but these errors were encountered: