You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I like the new @use syntax, but I ran into one issue.
When using a cms page builder I don't want my css to override the page builder ui components, but do want my css to be used in the page builder preview.
However, with @use we cannot do this as it requires @use at the top of the file.
main.scss
// Not needed here anymore as instead in each partial - @import 'my-scss-variables';
// Not needed here anymore as instead in each partial - @import 'my-scss-mixins';
body#front-end,
.page-builder-preview-container {
@use 'my-scss-part-1'; // Error
@use 'my-scss-part-2'; // Error
}
I understand that this is not the best approach, but sometimes this is a limitation of CMS or Page Builder we are using for our clients. If I was creating the SCSS from scratch this might not be as big of a deal, but I am trying to import a css library and since the css library has no clue as to which cms or page builder I am using they aren't thinking of that or adding that to their code.
I like the new
@use
syntax, but I ran into one issue.When using a cms page builder I don't want my css to override the page builder ui components, but do want my css to be used in the page builder preview.
So I was previously able to this:
main.scss
However, with
@use
we cannot do this as it requires@use
at the top of the file.main.scss
I understand that this is not the best approach, but sometimes this is a limitation of CMS or Page Builder we are using for our clients. If I was creating the SCSS from scratch this might not be as big of a deal, but I am trying to import a css library and since the css library has no clue as to which cms or page builder I am using they aren't thinking of that or adding that to their code.
So it might be like this:
main.scss
Is there any way around this with
@use
or@forward
?If there isn't, then I think one should be addressed before
@import
is deprecated.Thanks
The text was updated successfully, but these errors were encountered: