whiteglass icon indicating copy to clipboard operation
whiteglass copied to clipboard

Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0

Open Weishaupt opened this issue 1 year ago • 6 comments

Hey @yous,

I've just upgraded my bundle to all latest versions. Now I see some deprecation warnings w.r.t. whiteglass.

Deprecation Warning: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import

@import "whiteglass";

The first warning is related to the description on how to customize whiteglass

The other warnings are from whiteglass.scss

// Import partials.
@import
  "whiteglass/base",
  "whiteglass/layout",
  "whiteglass/syntax-highlighting"
;

Two further deprecation warnings are related to adjust-color()

Deprecation Warning: Global built-in functions are deprecated and will be removed in Dart Sass 3.0.0. Use color.adjust instead.

Weishaupt avatar Oct 30 '24 22:10 Weishaupt

Hi @Weishaupt,

Recently whiteglass v1.11.6 tried to replace lighten and darken with color.adjust, but #54 occurred. In Jekyll < 4, which is used by default github-pages gem (https://github.com/github/pages-gem/issues/813), there is no @use and color.adjust (https://sass-lang.com/documentation/modules/color/#adjust).

The latest sass-embedded is 1.80.5, so I think we can pin sass-embedded to < 3 in 1.11.x releases for Jekyll < 4, and make 1.12.x releases with newer syntaxes for Jekyll >= 4.

yous avatar Oct 31 '24 09:10 yous

Hey @yous,

this sounds like a good idea. Would you create a new branch for 1.12 then to be able to maintain releases for both branches, or just be done with 1.11?

Weishaupt avatar Oct 31 '24 20:10 Weishaupt

I'm thinking about this:

  • 1.x for Jekyll < 4
    • 1.11.x for current state and disable warnings that will be deprecated in Dart Sass 3.0.0
    • 1.12, 1.13, ... for whiteglass' new features
  • 2.x for Jekyll >= 4
    • 2.0 when Dart Sass 3.0.0 is released
    • 2.1, 2.2, ... for whiteglass' new features

When Dart Sass 3.0.0 is released, master will bump to 2.0, and I'll make 1.x branch for Jekyll < 4.

yous avatar Nov 04 '24 07:11 yous

jekyll-sass-converter recently added feature that can specify silence_deprecations option, but a new version has not been released.

  • https://github.com/jekyll/jekyll-sass-converter/pull/164

You can specify gem 'sass-embedded', '< 1.80' to disable warnings temporarily. When next version of jekyll-sass-converter is released, you can add the following lines to _config.yml:

sass:
  silence_deprecations: [import, global-builtin]

yous avatar Nov 04 '24 09:11 yous

jekyll-sass-converter v3.1.0 has been released: https://github.com/jekyll/jekyll-sass-converter/releases/tag/v3.1.0

Now you can add the following lines to your _config.yml to suppress warnings from whiteglass and scss files:

sass:
  silence_deprecations: [import, global-builtin]

yous avatar Feb 14 '25 05:02 yous

I'm thinking about this:

* 1.x for Jekyll < 4
  
  * 1.11.x for current state and disable warnings that will be deprecated in Dart Sass 3.0.0
  * 1.12, 1.13, ... for whiteglass' new features

* 2.x for Jekyll >= 4
  
  * 2.0 when Dart Sass 3.0.0 is released
  * 2.1, 2.2, ... for whiteglass' new features

When Dart Sass 3.0.0 is released, master will bump to 2.0, and I'll make 1.x branch for Jekyll < 4.

That makes sense to me. And it might even make sense to create the 2.x version now for those who want to get ahead of the game.

bobrocke avatar Mar 12 '25 21:03 bobrocke