Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,151,618 members, 7,813,034 topics. Date: Tuesday, 30 April 2024 at 05:14 AM

What Is The Benefit Of Learning Sass For Css - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / What Is The Benefit Of Learning Sass For Css (259 Views)

Bootstrap Vs SASS Vs Material UI / Help For CSS / Avoid The Hard Ways Of Learning Programming (2) (3) (4)

(1) (Reply)

What Is The Benefit Of Learning Sass For Css by Nobody: 2:36pm On Apr 22, 2023
What is the main benefit of sass or scss. How is it better than boostrap and tailwind. Everybody is just advicing me to learn sass because they see my projevt using only css with no framework to design a full website.
Re: What Is The Benefit Of Learning Sass For Css by davien(m): 4:56pm On Apr 22, 2023
Speeds up your productivity.
You can extend similar properties, use custom functions(mixins), while loops, if-else statements etc.

Take this forEach equivalent in sass

$spaces: (1, 2, 3, 4, 5);
@each $space in $spaces {
.#{$space}-div {
margin: $space * 2px;
}
}


There's also for loops

@for $x from 1 through 10 {
.-#{$x}-style {
padding: $x + 4px;
}
}

You can imagine how when you add JavaScript to these you can create complex animations.

(1) (Reply)

Can You Register A Foreign Startup Name In Nigeria As Yours? / I Need A Very Nice Bitcoin Investment Script / Mobile Phone Development Process

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 6
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.