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

Migrate from @import-rule to @use-rule #3697

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

DerPipo
Copy link

@DerPipo DerPipo commented Nov 26, 2023

This is a improvement/refactoring.

Since the @import-rule is deprecated, this PR switches to the @use-rule.

Usage of single parts of bulma (from within sass/scss) was also pretty fiddly, because not every file imported everything it needed, so you had to add the imports on your own where the order of imports also mattered.

Proposed solution

Essentially I did the three following things:

  • replace all @imports with the corresponding @uses
    • that required some additional @use statements that were missing
    • and required to use the namespaces
  • switch from node-sass to (dart-)sass to be able to use @use
  • add stylelint with scss support to make sure that there are no @imports anymore

What I not did (on purpose):

  • refactor anything else
  • rename anything
  • fix any of stylelints other thrown errors
  • update any other dependency

Tradeoffs

  • to reference variables, you are required to use namespaces, which creates longer names, longer lines and larger files

Testing Done

Projects builds, css output looks good.

Changelog updated?

No.

to be able to detect usages of "@import" which i want to replace with @use
and adjust the scripts acordingly, to be able to use the @use rule
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

Successfully merging this pull request may close these issues.

None yet

1 participant