Removing @import should be stopped
See original GitHub issueI agree that we need local vars. But at the same time, global var does bring benefit for certain reason. Moreover, @use
does not have some good features like @import
, which it supposed to have. For instance, nesting is a very important one that @use
should have. But it doesn’t.
On the global, we need it to set global configuration (a fixed one). Please refer #2750
For now, I decide to use both for whatever convenient for me. But I sure hope that we didn’t remove @import
and add nesting to @use
. Or I will have a tons of extra lines in my code.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Any reason to clean up unused imports in Java, other than ...
Removing unused imports is quite simple in both Eclipse and IntelliJ IDEA. Save this answer.
Read more >How to enable "remove unused imports"
You can remove all of the rules specified in Settings/Preferences | Editor | Code Style | <language> | Imports. Then hitting Ctrl+Alt+O (on ......
Read more >Help Article | How-To Stop or Undo Data Import - CSV Loader
Select the import you stopped and press the UNDO IMPORT button. Imported records will be cleaned by CSV Loader. Undo Data Import. If...
Read more >How Removing Tariffs Would Create Jobs and Boost the ...
Removing trade barriers like tariffs would be an effective tool to boost economic growth, connect more people to work, and increase ...
Read more >Import photos from a camera or phone using Photos on Mac
Photos imports your photos. To cancel importing, click Stop Import. When all photos have been imported, disconnect the camera or device from your...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The main difference between
@use
andload-css
is that@use
allows access to a file’s variables, functions, and mixins, whileload-css
only includes a file’s generated CSS. One of the goals of the module system is to make it easy to find where a given variable, function, or mixin comes from. To ensure that, we require that@use
is at the top-level of a file, before most other rules, and that it refers to a static URL.Given most nested
@import
s only cared about the CSS that was imported (and not the variables, functions, or mixins), we still support this behavior viaload-css
. As a bonus, the URL forload-css
doesn’t have to be a static string like@import
.You may find it helpful to refer to the “Goals” section of the module system spec to understand the reasoning behind these changes.
Nesting is still supported with the
load-css()
mixin - even improved because that mixin supports custom configuration and dynamic importing: