Skip to content

Deal with the consequences of https://sass-lang.com/d/import #858

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

Open
2 tasks done
pradyunsg opened this issue Jan 3, 2025 · 1 comment
Open
2 tasks done

Deal with the consequences of https://sass-lang.com/d/import #858

pradyunsg opened this issue Jan 3, 2025 · 1 comment

Comments

@pradyunsg
Copy link
Owner

What's happening?

Sass has deprecated @import, something that Furo relies on fairly heavily. The automated migration tool does not work for how Furo's code is layed out / built, so... I'll likely need to change how the styles are built.

Reproducer

  1. Build with stb compile
  2. Notice the deprecation warnings.

Expectation

No deprecation warnings.

This was requested by a maintainer.

  • I was asked to open an issue in a discussion by a maintainer.

Code of Conduct

@sveetch
Copy link

sveetch commented Mar 23, 2025

Hi, Bootstrap has done the transition to remove 'import' rule in profit of use/forward rules and migrated to the Sass builtin modules, there is a huge commit in a development branch:

twbs/bootstrap@9e28b85#diff-faf5c61d83af49020af8943c05226ca59b56525abac2c3c29298def71d9bea81

As a resume:

To restore the basic @import behavior to include the CSS rules like .foo {content: "plop";} from a _the_module.sass module just use @use the_module;.

To include mixins for usage you can use a joker like @use "foo" as *;, every functions, variables and mixins from _foo.sass module will be callable directly without any prefix.

If you just use @use foo; your functions, variables and mixins will need to be called with the module name as a prefix like foo.myfunction();.

Except the import/use rules you won't need to rewrite your Sass modules.

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

No branches or pull requests

2 participants