Meeting Cheat Sheet

The shift to remote work may have caused a boom in scheduled meetings. Whether you’re stuck in back to backs all day long or just feeling confused, here’s a handy guide to help you see what’s coming…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Understanding Sass Basics With Practical Examples

Learn how to use Sass on your projects.

Sass basics.
Image created with ❤️️ By Mehdi Aoussiad.

Sass stands for Syntactically Awesome Stylesheets. It is a CSS pre-processor that makes it easier to work with CSS, reduce repetition, and save time. This will help to style your pages easily with fewer lines of code. It’s like CSS with superpowers. In addition to that, Sass also has some amazing new features that we will cover in this article. That’s why it’s a good skill to have as a web developer.

In this article, we will learn about some Sass basics that you need to know in order to improve your CSS. Let’s get right into it.

Sass works Just like regular CSS, but the browser does not understand it, you will need a Sass pre-processor to convert Sass code into CSS. There is an extension in the popular text editor VsCode called “Live Sass Compiler”, it does all the job for you, just install it from your VsCode and you will be good to go.

Live Sass compiler.
Live Sass compiler.

Another way to compile Sass is by using NPM, but you have to make sure that you have Node installed in your system. Once you have done that, you can use the command below in your terminal.

Before we start with Sass comments, we will need to create a Sass file. We will use Scss because that’s what most people do. So we create Sass files as we do in CSS, but now make sure to put instead of .css => .scss .

We create Sass comments as we do in JavaScript. Have a look at the example below:

Variables in Sass are just like properties where you store values to use them again somewhere on your code by calling that variable name. In JavaScript, variables are defined using the let and const keywords. In Sass, variables start with a $ followed by the variable name.

Here is an example:

Add a comment

Related posts:

Propaganda Journey

Propaganda was a topic I have heard many times in the news and in headlines on social media. I was always familiar with the word but never fully understood the true meaning of it, the impact it has…

Product management skills for data scientists

At a pivotal point in my career, I moved from being a Data Scientist to being a Product Manager. I had worked on Uber’s Growth team, then on the A/B-testing platform. When the opportunity arose to…

Sem bateria

A justificativa para se esquivar do meu toque era o cansaço. Muito trabalho, pouco tempo, muita coisa para lidar, pouca coisa pra me dar. Se o amor provoca o vazio, nos resta dormir. Sem sonhar…