-
Notifications
You must be signed in to change notification settings - Fork 85
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
Can't import gem vendored Sass stylesheets #81
Comments
I have also used a small gem flag-icons-rails with Rails 4 which provides the country flags as images and a few scss styles for them. It is implemented as a rails::Engine and adds the paths to assets:path:
adding As far as I understand ( BTW the RailsGuides does not mention So how can I include SASS stylesheets and images from a gem in Rails 7 ? |
Using normal CSS files from gems with However this only works for vendored CSS, as this will just trigger another GET request from the browser to fetch the other stylesheet, which then is applied by the browser. Using this for SASS is not possible, as the browser can't use SASS. I tried changing the Adding each gem to the load path isn't really that useful, is there really no other way to use the vendored SASS files? |
I have a node_module referencing another modules sass file and sass won't compile because it cant find file. (yes the package is there. no I can't edit the third party import.
here's the cli line
|
I found that there's no such thing as "rake assets:reveal" |
We have the same issue. Any updates on this? |
I ended up switching to dartsass-rails and not use cssbundling-rails. dartsass:build has no issues. |
@MrNagoo I was using dartsass-rails but couldn't get my image_urls to work in my scss files. I tried to move to cssbundling-rails but it's been a nightmare and I can't get any of my variable imports (previously working with |
When following the sass-rails to cssbundling-rails upgrade instructions (step 2 of the guide), the default
build:css
script fails for (legacy) imports of stylesheets embedded within Ruby gems (within theirvendor/assets/stylesheets
), e.g.@import "foundation/functions";
. There is an errorError: Can't find stylesheet to import
.How can gem vendored Sass stylesheets be made available to the
sass
CLI?The text was updated successfully, but these errors were encountered: