Skip to content

Conversation

@mgreen-lz
Copy link
Contributor

@mgreen-lz mgreen-lz commented Oct 16, 2020

I'm working on fixing some 404 errors in a Rails app for work that uses jQuery-contextMenu. We're using the asset pipeline for fonts, which appends digest strings to their filenames. This causes this library's stylesheets to look for fonts in the wrong place.

This PR uses the asset pipeline's Sass helper functions if they exist to ensure that the correct font URLs end up in the compiled CSS in Rails apps. If those functions don't exists, e.g. when using Gulp to build CSS, it'll use url().

A similar approached is used by Slick Carousel to make their stylesheets' font URLs Rails friendly: https://github.com/kenwheeler/slick/blob/master/slick/slick-theme.scss#L33-L40

@bbrala
Copy link
Member

bbrala commented Nov 4, 2025

Good one, thanks

@bbrala bbrala merged commit d91b5db into swisnl:master Nov 4, 2025
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

Successfully merging this pull request may close these issues.

2 participants