267.What's SASS and SCSS ?
The technology we use today is outdated after a month. Constantly new software languages, markup languages, frameworks, and many other software projects that make our work easier.
SASS and SCSS are one of them. Sass was a Ruby Gem by Hampton Catlin in 2006, developed by the idea of developing CSS and CSS3 with a structure similar to Ruby. Continued to be developed by Hampton until 2008, Sass is currently being developed by hundreds of developers with repo on Github.
Sass translates the code written in its own syntax into CSS codes using the editor. Often, the editor used is added using the sss, scss add-on. The editor, with each save command, occurs as a file in the SASS, CSS output on the predefined path. This CSS file created by Sass, "* .sass" and "* .scss" is used by including it in the project.
If you want to automatically compress the CSS file created during compilation, you can obtain an extra CSS file with extension * .min.css and use it as an alternative in your project.
What's SASS ?.
When writing CSS with Sass; Variables, cycles (for, each, while), decision structures (if, else), function, mixin, nesting, selector inheritance.
When using Sass, ";" and "{}" are not used as they are in CSS. Sass was so based on the ruby language. But when the use as front-end is offered, it is rebuilt as SCSS.
What's SCSS?.
When writing Scss, we can use characters like ";" and "{}" as we are used to from CSS.
$bg-color:#333
.menu
background-color:$bg-color
ul
li a
color:#fff
$bg-color:#333;
.menu {
background-color:$bg-color;
ul {
li a {
color:#fff;
}
}
}
.menu {
background-color:#333;
}
.menu ul li a {
color:#fff;
}