Stop using @import with Sass | @use and @forward explained

Kevin Powell
Kevin Powell
247.2 هزار بار بازدید - 4 سال پیش - Keep up to date with
Keep up to date with my Sass course: https://beyondcss.dev/?utm_campaign=O...

The use of @import has been deprecated in Sass for quite a while now, but a lot of people still use it. In this video, I take a quick look at the replacements you should be using instead, @use and @forward. I just scratch the surface in this one, but it should be enough to get you started!

A quick note, if you are using node-sass, it is out of date and @use and @forward, as well as their entire module system, will not work. If you're using the Watch Sass extension in VS Code, there is no way to update it. If you are using npm or yarn, just switch out the install of node-sass for sass instead.

Check out this video for the basics of getting Sass set up using the command line: Sass with auto-refresh (and more) mad...

Why Sass changed to Dart: https://sass-lang.com/blog/announcing...

// Chapters
00:00 - Introduction
00:56 - Watching files for changes
02:00 - @use basics and namespacing
04:46 - important @import and @use difference
07:46 - namespacing
08:38 - @forward with an index file
12:22 - Outro

#sass #scss

--

Come hang out with other dev's in my Discord Community
💬 Discord: discord

---

Keep up to date with everything I'm up to
https://www.kevinpowell.co/newsletter

---

Help support my channel
👨‍🎓 Get a course: https://www.kevinpowell.co/courses
👕 Buy a shirt: https://teespring.com/stores/making-t...
💖 Support me on Patreon: Patreon: kevinpowell

---

My editor: VS Code - https://code.visualstudio.com/

---

I'm on some other places on the internet too!

If you'd like a behind the scenes and previews of what's coming up on my YouTube channel, make sure to follow me on Instagram and Twitter.

Instagram: Instagram: kevinpowell.co
Twitter: Twitter: KevinJPowell
Codepen: https://codepen.io/kevinpowell/
Github: https://github.com/kevin-powell

---

And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!
4 سال پیش در تاریخ 1399/12/05 منتشر شده است.
247,210 بـار بازدید شده
... بیشتر