If you start using Sass, you never want to write CSS by hand again. If you're new to frontend development like me, maybe you heard or read that, but what is Sass, and is it really that amazing?
If you start using Sass, you never want to write CSS by hand again.
If you're new to frontend development like me, maybe you heard or read that, but what is Sass, and is it really that amazing?
Sass (short for syntactically awesome style sheets) is a preprocessor scripting language that is interpreted or compiled into Cascading Style Sheets (CSS). The indented syntax and SCSS files are traditionally given the extensions .sass and .scss, respectively. (Wikipedia, n.d.).
In other words, it is a program that takes one data type (Sass) and converts it to another data type (CSS) and is fully compatible with all versions of CSS.
When I started to get comfortable using CSS, things started to get complicated and the stylesheets got longer and longer, and to be honest, it sometimes feels like a mess. So I tried Sass and enjoyed it.
It is very similar to CSS but is easier to write, and I don't have to repeat myself as the principle (DRY) advice.
Some of the principal features are:
Variables let you store information that you want to reuse throughout your stylesheet. You can store things like colors, fonts, etc.
Nesting in Sass will allow you to nest your CSS selectors in a way that follows a visual hierarchy, it's simple and useful, and you can use the “&” character to get a reference of the parent selector.
But you should be careful that excess nested rules will result in overly qualified CSS which is a bad practice.
Partials in Sass will allow you to create small Sass files that you can include in other Sass files. Thanks to the @import rule, a partial is created by naming it with an underscore: _buttons.scss.
This is a great way to keep your code tidy.
Mixes (reusable style blocks) A mixin allows you to make groups of CSS statements that you want to reuse throughout your code.
Learning to Code: How to Boost Up the Process? I also often recommend different online and offline resources to my students to make their learning process easier, more effective, and faster. And in this post, I will share a few tips with you.
Hey everyone, it’s Monday and that means I’ve been working my shifts and been to the gym after so this post is coming in a bit later than usual, however I’ve been keen to get back into the coding all day so let’s jump in and learn something new!
Sass is a stylesheet language that’s compiled to CSS. It allows you to use variables, nested rules, mixins, functions, and more, all with a fully CSS-compatible syntax. Sass helps keep large stylesheets well-organized and makes it easy to share design within and across projects.
You got intrigued by the machine learning world and wanted to get started as soon as possible, read all the articles, watched all the videos, but still isn’t sure about where to start, welcome to the club.