-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Removing @import should be stopped #2753
Comments
Nesting is still supported with the @use 'sass:meta';
@each $theme, $file in $themes {
[data-theme="#{$theme}" {
@include meta.load-css("themes/#{$file}",
$with: ("base-color": $brand));
}
}
} |
Now, I'm totally lost. I don't understand where the 'even improved' is. Why it cannot be like this: .xyz {
@use 'xxx' with ( $url: 'to://no.where' );
} Ain't it much simple? |
The main difference between Given most nested You may find it helpful to refer to the "Goals" section of the module system spec to understand the reasoning behind these changes. |
Ok, it seems an appealing solution (
So I'm thinking about passing external data to scss compiler. Do we have any way to do so? I'm using gulp-dart-sass btw. |
I agree that it feels heavier compared to the old way. Just my thoughts on the direction of SASS... It's one of those things where you either make things dead simple and abstract the complexities that'll later bite you with debugging hell in complex apps (LESS) or you make things a little more stricter upfront to prevent that from happening but have more to grasp about the inner workings (SASS as of late). To me having used both LESS and SASS, I feel LESS is like jQuery with things just working and easily understood where SCSS is getting more and more complex and programmatically structured like some of the JS frameworks. LESS may be the better solution for people with simple setups but SASS offers more power for others that have more advanced setups. For simple projects I'd recommend LESS to hit the ground running and for more advanced ones I'd go with SASS. Obviously go with the language of whatever framework you're using. Bootstrap 4 uses SASS now and so I've been using it. |
I 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.The text was updated successfully, but these errors were encountered: