+ 5
css & sass
Despite the vast advances that have occurred in css, is there any need to use sass?
8 odpowiedzi
+ 5
Scss
https://codepen.io/cv2k10/pen/bybZNd.scss
Compiled to css
https://codepen.io/cv2k10/pen/bybZNd.css
Gordon compare and see....
+ 4
Zoughi-Javad check out thses 2 codes, to see how does Sass/scss help in writing all the css selectors in logical and organise way, More importantly it helps create complicated css faster with much lesser codes.
This first one were written in scss (less than 60 lines of codes)
and the latter one were written in css (over 6k lines of codes).
https://code.sololearn.com/Wv1mCxILb1cr/?ref=app
https://code.sololearn.com/W25dnn7h8mcf/?ref=app
+ 2
We need sass is due to css is not advance enough, css itself is lacking of variable assignment, code nesting, partial code support, code import, code grouping like maxins and other advanced features like code extend and math operators functions.
Using sass would write a better codes, DRY (don't repeat yourself) method, maintenanable with code import, code reuse of maxins, inheritance by code extend, making accurate calculation of dimensions width/height by using math operators.
+ 2
wow, it's so good 🤤
+ 1
Though I like postCSS more (preCSS) …
Calviղ how is your experience with it?
+ 1
Emoji FanBoy IMHO, postCSS is a great tool, I would consider postCSS as a tool to complement Sass/scss, rather than replace it. postCSS has autoprefixer and cross vendor that would be set from js, so it saves more works from writing common mixin on sass. Using sass with postCSS would create more enjoyable experience of code writing.
0
Calviղ
Yeah, that's general opinion I've mostly seen across web and that's fine.
But…
I was referring to preCSS, postCSS pluging which is substitute for Sass. https://github.com/jonathantneal/precss
It's very close Sass syntax (and some call it new Sass 😀), still have some benefits using it over Sass.
(Sorry that didn't clearly said it in previous reply)
0
I lost marks on mock exam that sass is a CSS preprocessor. I have no clue about this. LESS, SASS and RubySASS there is so many extra library's you need to know. This idea that html and CSS is an easy way to start learning coding is a bit misguided or misleading.