lazaronixon/trix-extensions

image-url vs. url

Opened this issue · 2 comments

dmexs commented

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.

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

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'); }