-
Notifications
You must be signed in to change notification settings - Fork 1
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
What to do about bootstrap 5.2 #268
Comments
Final two points aren't relevant - bootstrap uses a custom division function that works with libsass, effectively "reverse polyfilling" support from the new dart version back to the old version. The deprecation warnings come from our own code, which uses |
I thought we'd solved this by switching around our includes, but it still triggers in precompilation. Latest review of options: Option 2.1
Option 3.1
Option 4.1See if we can refactor further, so that all the stylesheets are handled in one pass, e.g. including leaflet and iD via sass Option 5See if we can persuade sassc-rails to become a wrapper for dartsass-sprockets Option 6Figure out what alternatives there are for using bootstrap, e.g. not from a gem, to allow us to switch to dartsass-sprockets Option 7Figure out whether to drop sprockets and move to whatever CSS option is the default approach in rails. |
Option 3.1 has happened! So now we need to do some forking of the gem, since I doubt it would be backported to existing releases. We'll need to start with a 5.1 fork that has the dependency removed, start using that with dartsass, and then do the same again for 5.2 |
|
See sass/sassc-rails#174 and in particular my comment at sass/sassc-rails#174 (comment)
So originally sass was a ruby project, then it became a C++ "libsass" which was available as sassc. Now the official implementation is in Dart.
This is a list of related ruby gems, there's a lot here:
sass
- the og implementation of sass, in rubysassc
- rubygem that uses libsass. Note that the repo is calledsassc-ruby
.sass-rails
- was originally based onsass
, now just a wrapper forsassc-rails
.sassc-rails
- what we use, depends onsassc
andsprockets-rails
sass-embedded
- a wrapper around the Dart version of sass. Note that the repo issass-embedded-host-ruby
sassc-embedded
- a shim to makesassc
work withsass-embedded
. Note that the repo issassc-embedded-shim-ruby
dartsass-ruby
- a wrapper aroundsass-embedded
, but which implementssassc
compatibilitydartsass-sprockets
- a wrapper arounddartsass-ruby
, but which implementssassc-rails
compatibilityThe problem is that the bootstrap gem depends directly on sassc-rails, which makes it impossible to use dartsass-sprockets since they reuse the same namespace when both are loaded at the same time.
Option 1
Pin
sassc
gem to an old version, from before April 2019 when the error message was implemented in libsass.Option 2
Use the
sassc-embedded
shim. This involves running a modified version of sassc that disables half the stuff, plus the sassc-embedded shim to make that stuff work via dart.Option 3
Use dartsass-sprockets.
Option 4
Rename our css files to scss. This means that sprockets can do the stylesheets in one pass, which saves libsass from trying to read the minified version that is triggering this error.
Followups
The text was updated successfully, but these errors were encountered: