I became completely confused. I asked a long time web design associate for what my next step should be in learning design/development. He said I should focus on SCSS while learning everything else I am. However, I looked up "SCSS tutorials" and everything comes up as "Sass tutorials".
But when I look up "Sass vs SCSS" , the links and articles show they are different things.
Is Sass and SCSS the same or different? And would I be learning SCSS by taking Sass courses?
Sass is a CSS pre-processor with syntax advancements. Style sheets in the advanced syntax are processed by the program, and turned into regular CSS style sheets. However, they do not extend the CSS standard itself.
CSS variables are supported and can be utilized but not as well as pre-processor variables.
For the difference between SCSS and Sass, this text on the Sass documentation page should answer the question:
The SCSS syntax uses the file extension
.scss. With a few small exceptions, it’s a superset of CSS, which means essentially all valid CSS is valid SCSS as well. Because of its similarity to CSS, it’s the easiest syntax to get used to and the most popular.
The indented syntax was Sass’s original syntax, and so it uses the file extension
.sass. Because of this extension, it’s sometimes just called “Sass”. The indented syntax supports all the same features as SCSS, but it uses indentation instead of curly braces and semicolons to describe the format of the document.
However, all this works only with the Sass pre-compiler which in the end creates CSS. It is not an extension to the CSS standard itself.
I'm one of the developers who helped create Sass.
The difference is syntax. Underneath the textual exterior they are identical. This is why sass and scss files can import each other. Actually, Sass has four syntax parsers: scss, sass, CSS, and less. All of these convert a different syntax into an Abstract Syntax Tree which is further processed into CSS output or even onto one of the other formats via the sass-convert tool.
Use the syntax you like the best, both are fully supported and you can change between them later if you change your mind.
The difference between Sass, Scss, and Css?
sass - Differences between SCSS and LESS - Stack Overflow
What is SCSS and where to learn it
CSS, SCSS, SASS?
Thank you, will do :)
More on reddit.comVideos
Both Sass and Less are CSS preprocessors.
From keycdn.com
A CSS preprocessor is basically a scripting language that extends CSS and then compiles it into regular CSS.
So Sass and Less don't change the functionality of CSS, as they are compiled into plain old CSS. What they do is make it easier to write and maintain CSS with tools such as mixins, nesting, variables, and more.
SCSS, which stands for 'Sassy CSS' is one of two syntaxes for Sass.
From the sass reference:
The second and older syntax, known as the indented syntax (or sometimes just "Sass"), provides a more concise way of writing CSS.
The difference
Both Sass and Less have very similar features. There are syntactical differences, for example, Sass uses $ for variables whereas less uses @ .
There are some slightly more subjective differences, this website claims that "LESS Has More User-Friendly Documentation Than SCSS", however personally I have found the SCSS documentation and examples very easy to use.
SCSS and LESS are both "supersets" of vanilla CSS. That means valid CSS is automatically also valid SCSS and LESS, but not necessarily the other way around.
The difference between SCSS and LESS is that they have a different syntax. They mostly have the same functionalities.
I'm coding my 1st website and I was wondering which style sheet to use. What's the difference between these 3? Is any of them more supported than the other ones, even in way older browsers? Thanks!
Edit: Thanks for all the answers everyone, I get it now. I was just wondering which one of these I should use because I thought SASS seemed easier - no brackets and you can just edit an element's style within anothwr element's style (if that makes sense). But I am now aware that I should stick to "vanilla" CSS until I am very comfortable with it. Thank you once again. Great subreddit!
Just to give some examples, because that's often a neat way to explain the difference:
CSS (what the browser understands):
h1.foo {
background: red;
}
h1.foo .bar {
text-shadow: 0 1px red;
}
SASS (compiles to CSS, supports things like nesting and variables):
$color: red
h1.foo
background: $color
.bar
text-shadow: 0 1px $color
SCSS (SASS, but written with a CSS-like syntax):
$color: red;
h1.foo {
background: $color;
.bar {
text-shadow: 0 1px $color;
}
}
The latter two compile to CSS when you run them through a program. You then send the compiled files to the browser, since browsers only understand CSS.
The key to surviving in modern web development, and software development in general, is to keep things as simple as possible and only let them get more complex as needs require them to. This crap moves and changes way too fast to try and determine what to use at any given moment based only on what others seem to be doing, not to mention that their reasons for doing it that way may have no relation to what you're trying to do and so there's never a canonical "right" answer (and anyone saying otherwise has an agenda that you'd do well to stear clear of).
So, in your case, it's easy: use plain old CSS unless and until you need some specific thing that SASS or LESS gives you. Neither are required to be productive in any way, shape or form and in fact they seem to just get in the way if your project isn't of a sufficient complexity to make what they provide valuable of for no other reason than they introduce a new build step (the lesser the better).
You'll find out pretty quickly if you need variables for example. A lot of the times you really don't. But if you hit a wall with CSS and you think "gee, if I had variables then I could solve this easy" then it's time to migrate. That's how you know, simple. as that.
Until that point, KISS (Keep It Simple Stupid, in case you've never heard that).
I've been looking at some guides for SCSS and SASS, but it seems the guides include them in one.
The only difference I can tell between them right now is that SCSS needs to have the brackets and semicolons and since it uses that you can kind of write the SCSS syntax kind of loosely like CSS. Whereas, SASS you have to write with like the tab nesting or it won't work?
I'm actually looking at the React doc's adding a Sass Stylesheet and the guide says to install node-sass, but then the files are named .scss?
What tooling do you use in your sites? I currently am using SCSS, I like how it just works. Postcss seems difficult. If I want to build a mini css component library what is my best route?
is there something better? Why should I use something else? What’s everyone’s opinions?
Also, for alternatives, if possible please provide a demo link.
Thanks