In this course, you will learn the basics of Sass. We will start with a brief overview of what Sass is along with what is required to incorporate Sass into your environment. We will also set up a Sass compiler in Visual Studio Code. You will learn about Sass variables, maps, nesting, functions, mixins, extending, and operations.
Lastly, we will start from scratch on a real-world project (Portfolio website) using Sass. We will go step-by-step through each part, and at the end, we will deploy the site.
🔗 Project Code: https://github.com/codeSTACKr/portfolio-sass
🎥 Tutorial from codeSTACKr. Check out their YouTube Channel: https://www.youtube.com/codeSTACKr
⭐️ Course Contents ⭐️
⌨️ (0:00:00) Intro
⌨️ (0:00:58) What Is Sass?
⌨️ (0:01:24) Requirements
⌨️ (0:02:15) Install/Setup Live Sass Compiler VS Code Extension
⌨️ (0:04:02) Folder Structure / Sass Syntax
⌨️ (0:08:06) Variables
⌨️ (0:10:03) Maps
⌨️ (0:03:00) Nesting
⌨️ (0:16:54) Partials
⌨️ (0:19:40) Functions
⌨️ (0:21:30) Mixin Example 1
⌨️ (0:24:26) Mixin Example 2
⌨️ (0:28:00) Mixin Example 3
⌨️ (0:30:20) Extend
⌨️ (0:32:05) Math Operations
⌨️ (0:33:49) How to Learn More (Documentation)
⌨️ (0:34:02) Real-World Example From Scratch (Portfolio Site)
⌨️ (0:34:38) index.html
⌨️ (0:40:35) Font Awesome Setup
⌨️ (0:41:29) main.scss / _config.scss
⌨️ (0:48:18) _home.scss
⌨️ (0:52:55) Transition Ease Mixin
⌨️ (0:54:24) Text Color Function
⌨️ (0:57:10) _menu.scss
⌨️ (1:02:38) main.js
⌨️ (1:06:08) Menu cont.
⌨️ (1:19:38) about.html
⌨️ (1:23:51) _about.scss
⌨️ (1:30:37) projects.html
⌨️ (1:35:05) _projects.scss
⌨️ (1:43:57) contact.html
⌨️ (1:47:09) _contact.scss
⌨️ (1:49:56) _responsive.scss
⌨️ (2:01:35) Deploy on Github Pages
✔️ codeSTACKr on Twitter: https://twitter.com/codeSTACKr
✔️ codeSTACKr on Instagram: https://instagram.com/codeSTACKr
✔️ codeSTACKr website: http://codeSTACKr.com
—
Learn to code for free and get a developer job: https://www.freecodecamp.org
Read hundreds of articles on programming: https://medium.freecodecamp.org
great
great tutorial…definitely worth the time and very beginner friendly
Doe anyone even see a difference in font weights from 400 to 500? I don't. Now 400 to 700 ya.
my scss is not adding vendor prefixes 🙁
Can you suggest me something sir
At 30:00, i.e. after
@include mobile {
flex-direction: column;
}
I'm unable to save the SCSS file. It says:
Error: Declarations may only be used within style rules.
╷
54 │ flex-direction: column;
│ ^^^^^^^^^^^^^^^^^^^^^^
Nah!
My img is not loading, please I need help asap 😀 .home{
height : 100%;
padding-top: 40vh;
overflow: hidden;
align-items: center;
text-align: center;
background: url('./img/model-1.jpg');
background-size: cover;
}
(49:09)
the whole day have been watching different video about sass and coundlnt understand until i got to find this one
Hi,
I have watched a few of your videos and decided I had to create a YouTube account to comment on this vid.
First of all, I use Visual Studio 2022 and not VS Code. Secondly, I use Web Compiler 2022 but if doesn't add the -moz, etc prefixes. Thirdly, the browser link is built-in and fourth, who would be allowed to use emmet in a professional environment?
SCSS in VS and VS Code are different. In VS Code, you can use @use but in Visual Studio, you cannot. This is down to the developers of Visual Studio not implementing it when it's been asked for many times over the years by the Community. Also, on your map-get($weights, bold), you have to put the key in double quotes in VS. Whether that is another Microsoft issue, I have no idea. Anyway, you should be checking if the value exists in the map & display and error: @error "bla bla bla". Another keyword VS doesn't recognise but Dart SCSS does.
It is also recommended (in VS you can override this) to use lowercase css names for variables, colours etc. So, your variable name [lowercase][Uppercase] is fine for code behind but not variables.
The next item is your theme where you use lighten/darken. The recommendation is keep to a percentage of 20 or below. Sure, it takes the value of 1-100.
Although, I am only 48 mins in, I have seen this project before in another of your videos. I know you just began but where is your SCSS structure, and have you used _config for your _variables? Don't forget the @use "config"; rather than @import "config"; Kevin Powell also agrees it seems (not watched it): https://youtu.be/CR-a8upNjJ0.
Nesting, I was always taught '& p {…}' and is recommended not to exceed 4 levels deep.
In brief, always great videos of yours. It seems the free VS Code is better with SCSS than the extortional VS, but I like the MSDN, so will keep buying it.
Back to this video and no more comments on it.
Thanks Beau and freeCodeCamp.org !!
▶️ Check out my channel for more: youtube.com/codeSTACKr