-
Notifications
You must be signed in to change notification settings - Fork 2
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
Migrate from SassC to Dart Sass #313
base: master
Are you sure you want to change the base?
Conversation
The jquery-ui-rails gem uses Sprockets require directives, which are incompatible with dartsass-rails.
This file is replaced by the dartsass-rails default input file at app/assets/stylesheets/application.scss.
dartsass-rails doesn't support asset helper methods
After pursuing this approach, I'm not convinced that integrating this code is advisable. We've already committed to jsbundling-rails, making cssbundling-rails the logical choice for asset management. In addition, migrating to @use 'tom-select/dist/scss/tom-select.bootstrap5' Results in a build failure:
This variable does in fact exist in the gem:
... and I believe the build failure is attributable to an ordering issue, similar to what's described here: rails/dartsass-rails#43 (comment). |
Hello, Just for note, maybe not related; but we still use Bootstrap 4.3 in Agroportal and maybe that is why make tom-select work, and maybe will we have those same issues when migrating to Bootstrap 5. In the matter of migrating to Dart Sass, I also tried to do it some time ago but did not work, |
This pull request migrates from SassC to Dart Sass, and was motivated by two main factors: 1) SassC is deprecated, and 2) a recent attempt to integrate styles from the tom-select plug-in failed (see #312). The comments in Migration from sassc-rails workarounds issue were particularly useful.
Changes include:
sassc-rails
gem withdartsass-rails
app/assets/stylesheets/application.scss
@import
to the@use
rule in the default input filejquery-ui
styles and process with Sprockets. Thejquery-ui-rails
gem depends on Sprocketsrequire
directives, which aren't supported indartsass-rails
.as
clausesimage-url
asset helpers withurl
, as dartsass-rails doesn't support asset helpers