|
| 1 | +--- |
| 2 | +title: Jekyll Sass Converter 3.0 Released |
| 3 | +date: 2022-12-21 17:52:15 +0530 |
| 4 | +author: ashmaroli |
| 5 | +category: community |
| 6 | +--- |
| 7 | + |
| 8 | +Jekyll Sass Converter 3.0 shipped recently and is available to those using Jekyll 4.3 and above. This release contains major changes. |
| 9 | +Specifically, the plugin has **stopped using `sassc` for converting your Sass partials and stylesheets** into CSS files. |
| 10 | +Instead, the converter now uses the `sass-embedded` gem acting as an interface to Dart Sass, which is the current primary |
| 11 | +implementation of Sass under active development. The secondary implementation `libsass` which the `sassc` gem interfaced |
| 12 | +with has been deprecated by its developers. |
| 13 | + |
| 14 | +However, Dart Sass isn't *fully compatible* with older Ruby Sass workflow. |
| 15 | + |
| 16 | +## Requirements |
| 17 | + |
| 18 | +- Minimum Ruby Version: `Ruby 2.6.0` (all platforms). |
| 19 | +- Minimum Rubygems Version: `3.3.22` (for Linux-based platforms). |
| 20 | + |
| 21 | +## Migration Guide |
| 22 | + |
| 23 | +### Dropped `implmentation` Option |
| 24 | + |
| 25 | +In `v3.0.x`, `sass-embedded` is the only supported Sass implmentation, and therefore the config option |
| 26 | +`sass.implementation` introduced in `v2.2.0` has been removed. |
| 27 | + |
| 28 | + |
| 29 | +### Dropped `add_charset` Option |
| 30 | + |
| 31 | +The converter will no longer emit `@charset "UTF-8";` or a `U+FEFF` (byte-order marker) for `sassify` and `scssify` |
| 32 | +Jekyll filters and hence the redundant option `sass.add_charset` is no longer active. |
| 33 | + |
| 34 | + |
| 35 | +### Dropped `line_comments` Option |
| 36 | + |
| 37 | +`sass-embedded` does not support `sass.line_comments` option. |
| 38 | + |
| 39 | + |
| 40 | +### Dropped support of importing files with non-standard extension names |
| 41 | + |
| 42 | +`sass-embedded` only allows importing files that have extension names of `.sass`, `.scss` or `.css`. SCSS syntax in |
| 43 | +files with `.css` extension name will result in a syntax error. |
| 44 | + |
| 45 | + |
| 46 | +### Dropped support of importing files relative to site source |
| 47 | + |
| 48 | +In `v2.x`, the Converter allowed imports using paths relative to site source directory, even if the site source |
| 49 | +directory is not present in Sass' `load_paths` option. This is a side effect of a bug in the converter, which will remain as is in |
| 50 | +`v2.x` due to its usage in the wild. |
| 51 | + |
| 52 | +In `v3.x`, imports using paths relative to site source directory will not work out of box. To allow these imports, `.` |
| 53 | +(meaning current directory, or site source directory) need to be explicitly listed under `load_paths` option. |
| 54 | + |
| 55 | + |
| 56 | +### Dropped support of importing files with the same filename as their parent file |
| 57 | + |
| 58 | +In `v2.x`, the Converter allowed imports of files with the same filename as their parent file from `sass_dir` or |
| 59 | +`load_paths`. This is a side effect of a bug in the Converter, which will remain as is in `v2.x` due to its usage in the |
| 60 | +wild. |
| 61 | + |
| 62 | +In `v3.x`, imports using the same filename of parent file will create a circular import. To fix such imports, rename |
| 63 | +either of the files, or use complete relative path from the parent file. |
| 64 | + |
| 65 | + |
| 66 | +### Behavioral Differences in Sass Implementation |
| 67 | + |
| 68 | +There are a few intentional behavioral differences between Dart Sass and Ruby Sass. Please refer |
| 69 | +[Behavioral Differences from Ruby Sass][behavioral-differences] for details. |
| 70 | + |
| 71 | +[behavioral-differences]: https://github.com/sass/dart-sass#behavioral-differences-from-ruby-sass |
0 commit comments