We just made a big upgrade to our Sass compiler pipeline in Discourse, moving from the deprecated libsass to the maintained Dart Sass.
This is a seamless move, and nothing should change on your website after the upgrade. In the rare case that something broke, read-on.
A note for developers & designers
During the move, we went over all open-source plugins and themes and made sure everything was still working with the new pipeline, and made changes/PRs to handle any warnings during compilation.
Version details
This moves us
From:
- sassc 2.0.1 (Feb 2019)
- libsass 3.5.2 (May 2018)
To:
- dart-sass 1.58 (Jan 2023)
This update applies the following deprecations:
These breaking changes are coming soon or have recently been released:
Functions are stricter about which units they allow beginning in Dart Sass 1.32.0.
Selectors with invalid combinators are invalid beginning in Dart Sass 1.54.0.
/ is changing from a division operation to a list separator beginning in Dart Sass 1.33.0.
Parsing the special syntax of @-moz-document will be invalid beginning in Dart Sass 1.7.2.
Compound selectors could not be extended in Dart Sass 1.0.0 and Ruby Sass 4.0.0.
Q&A
There was no hard-breaking changes for this upgrade, so 99% of the themes will work just fine.
If you are running Discourse without any custom themes, nothing changes. Next time you upgrade (or are upgraded by your hosting company) this will happen in the background.
If you are on CDCK hosting and using a theme we developed for you, we have already made it compatible with Dart Sass.
If you use an official theme and/or a number of theme-component, we’ve already made those compatible with the new Sass version.
If your custom theme is broken, please share it with us and we will help fixing it.