Skip to content
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

unclear tip #1141

Closed
1 task done
sineptic opened this issue Jul 31, 2024 · 7 comments
Closed
1 task done

unclear tip #1141

sineptic opened this issue Jul 31, 2024 · 7 comments
Labels
meta Repository-wide issues

Comments

@sineptic
Copy link

Is there an existing issue outlining your problem?

  • I have searched the existing issues and they do not solve my problem.

Describe your issue.

How do I theme images and SVGs? don't clarify, that it don't work if you don't add any generic in svg, but almost all(I think) do this as first step.

@sineptic sineptic added the meta Repository-wide issues label Jul 31, 2024
@uncenter
Copy link
Member

it don't work if you don't add any generic in svg

Please clarify, I don't know what you mean by this.

@sineptic
Copy link
Author

sineptic commented Aug 1, 2024

don't work:

.some {
  @svg: escape('<svg fill="blue" width="300" height="130" xmlns="http://www.w3.org/2000/svg"><rect width="200" height="100" x="10" y="10" rx="20" ry="20"/></svg>');
  background-image: url("data:image/svg+xml,@{svg}");
}

work:

.some {
  @svg: escape('<svg fill="@{mauve}" width="300" height="130" xmlns="http://www.w3.org/2000/svg"><rect width="200" height="100" x="10" y="10" rx="20" ry="20"/></svg>');
  background-image: url("data:image/svg+xml,@{svg}");
}

@uncenter
Copy link
Member

uncenter commented Aug 1, 2024

Yep. That's an issue with Stylus/Less really, but since the whole point of adding the SVG is changing the colors... that shouldn't be an issue. Feel free to open a PR explaining this if you want.

@sineptic
Copy link
Author

sineptic commented Aug 1, 2024

Yes, "whole point of adding the SVG is changing the colors", but first step is just add it somehow. And for new users of Stylus(like me) this error is stange, because I follow docs.

@uncenter
Copy link
Member

uncenter commented Aug 1, 2024

Right, but this isn't an issue with our instructions it's an issue with the parser. As I said feel free to raise a PR clarifying if you want to.

@uncenter uncenter closed this as completed Aug 1, 2024
@sineptic
Copy link
Author

sineptic commented Aug 1, 2024

did I need to make branch in fork for this pull request?

@uncenter
Copy link
Member

uncenter commented Aug 1, 2024

did I need to make branch in fork for this pull request?

It helps to make it on a separate branch but technically you can make it from the main branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta Repository-wide issues
Projects
None yet
Development

No branches or pull requests

2 participants