Skip to content
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

Deprecation warnings Dart Sass 3.0.0 #470

Open
Crossed-Omega opened this issue Nov 17, 2024 · 3 comments
Open

Deprecation warnings Dart Sass 3.0.0 #470

Crossed-Omega opened this issue Nov 17, 2024 · 3 comments
Assignees
Labels

Comments

@Crossed-Omega
Copy link

Upon using bundle exec jekyll serve the generator emits many warnings about the deprecation of the @import system in Dart Sass.

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

  ╷
1 │ @import "type-on-strap";
  │         ^^^^^^^^^^^^^^^
  ╵
    C:\Users\Windows-PC\Documents\Coding\Jekyll\type-on-strap\Type-on-Strap\assets\css\main.scss 1:9  root stylesheet

The webpage linked by Sass has an automatic migrator that can be ran over the style sheets with

$ npm install -g sass-migrator
$ sass-migrator module --migrate-deps your-entrypoint.scss

or, alternatively on Windows, downloading the dart executable and running (dry run and normal run emit the same exception)

.\sass-migrator module --migrate-deps -n C:\Users\Windows-PC\Documents\Coding\Jekyll\type-on-strap\Type-on-Strap\assets\css\main.scss

This however yields an exception that complains about an element miss in a list. Fairly sure that this is a bug on Sass-migrators' side.

Obviously, it would be nice to fix the deprecation warnings so as to not clutter the generation output, as well as future stability.

@sylhare
Copy link
Owner

sylhare commented Nov 18, 2024

I think the problem is from the GitHub Page gem which does not support the most recent jekyll-sass-converter.
cf: github/pages-gem#813

If I wear to update, not sure how compatible it will be as a GitHub page.

@Crossed-Omega
Copy link
Author

Hmm, fair. Is this a roadblock that needs to be cleared from GitHub Pages' side or is manual conversion possible? I use GitLab pages, I am fairly sure they have different compatibilities.

@sylhare
Copy link
Owner

sylhare commented Nov 20, 2024

From the link https://sass-lang.com/documentation/breaking-changes/import/ it says:

We’re deprecating both Sass @import rules and global built-in functions now that the module system (@use and @forward rules) has been available for several years.

So the new way might be compatible with the older jekyll-sass-converter 🤔
I can try it out, see if I can do the migration and make it work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants