Should I use @import "file" or @use "file" and/or @forward in my scss file(s)? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Should I use @import "file" or @use "file" and/or @forward in my scss file(s)?

1st Aug 2021, 5:33 AM
Kenedy Olisi
Kenedy Olisi - avatar
2 Answers
+ 3
@import create global css selectors, which allows all html files access. @use is modular css, only allow current file to access @forward enable @use module to be extended from current file. @import is not a good option, it's advisable to use @use rather than @import. Read more https://www.liquidlight.co.uk/blog/use-and-import-rules-in-scss/
2nd Aug 2021, 1:15 AM
Calviղ
Calviղ - avatar
1st Aug 2021, 6:27 AM
The future is now thanks to science
The future is now thanks to science - avatar