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

image-url vs. url #5

Open
dmexs opened this issue Aug 23, 2020 · 2 comments
Open

image-url vs. url #5

dmexs opened this issue Aug 23, 2020 · 2 comments

Comments

@dmexs
Copy link

dmexs commented Aug 23, 2020

Using webpacker for stylesheet and javascript preprocessing I found that the rails helper image-url used to specify the path of the SVG icons doesn't resolve properly.

.trix-button--icon-horizontal-rule::before { background-image: image-url("trix_horizontal_rule.svg"); }

Not sure if this is a webpacker specific issue but wanted to mention it for others.

@inspire22
Copy link

Me as well. Changing it to just "url" fixed it.

@crivotz
Copy link

crivotz commented Dec 12, 2023

In my case I use Webpacker also for images (a folder inside app/javascript/images/) and I change scss in

.trix-button--icon-color::before { background-image: url('../images/trix_color.svg'); }

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

3 participants