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

[Proposal] Add option to skip some phrase during encoding #352

Open
dimitor115 opened this issue Dec 29, 2019 · 1 comment
Open

[Proposal] Add option to skip some phrase during encoding #352

dimitor115 opened this issue Dec 29, 2019 · 1 comment

Comments

@dimitor115
Copy link

Hi, I'm currently working on some project where we inline our svgs in the CSS (SCSS). At this moment I'm facing a situation where I have one SVG file per icon and I would like to have it in different colors.

While there is no easy way to style using CSS the SVG inlined as URL, I had an idea to change the color using SCSS variables. As this awesome guy did here: https://codepen.io/kevinweber/pen/dXWoRw.
However, I would like to have my svgs in separate files and use this loader for encoding instead of doing everything in SCSS.

So my idea is to use this loader before SCSS loader, and by configuration tell this loader to skip given phrase or skip scss variables or sth.

If you like this idea I can propose some PR.

@bhovhannes
Copy link
Owner

@dimitor115 can you please explain your idea more?

So my idea is to use this loader before SCSS loader, and by configuration tell this loader to skip given phrase or skip scss variables or sth.

This loader should be applied to SVG files. When applied to SCSS file it may work because currently internally it uses regular expressions to escape unsafe characters. However this is internal implementation detail and one should not rely on that.

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

No branches or pull requests

2 participants