lazaronixon / trix-extensions

Trix Extensions
MIT License
195 stars 27 forks source link

image-url vs. url #5

Open dmexs opened 4 years ago

dmexs commented 4 years ago

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. https://github.com/lazaronixon/trix-extensions/blob/9ab2a904b0a7782d475fc17935621b2096a3a3be/assets/stylesheets/richtext.scss#L2

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

inspire22 commented 4 years ago

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

crivotz commented 11 months ago

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