We have already written that when developing the site, CSS is necessarily used - a special style of styles. With it, all elements are set sizes, position, background color, animation, and much more. The file with styles connects to the site pages and is performed by the browser so that they look exactly as designer conceived.
But writing CSS is a time-consuming work, because for each element you need to specify many properties. For some projects, the styles file can grow to several thousand rows of the code and it becomes difficult to navigate it. To simplify the task, many developers use the so-called CSS preprocessors that allow you to reduce the routine tasks when writing styles.
Despite the rather loud name, preprocessors are just a superstructure over the usual CSS. That is, it is just another way of writing code, which is then converted into ordinary styles.
Preprocessors allow you to write classes of elements in abbreviated form, skip the sign ";" At the end of each line and curly braces, use variables, calculations and much more. The same type of styles can be described once and then just insert into the desired location with one instruction. And this is only a small part of their capabilities.
But the browser cannot work with the style file written in the language of the preprocessor. Therefore, to get a regular CSS file, you need to compile. There are different ways, including the conversion "on the fly" directly in the editor.
There are several types of preprocessors, but the basic only three:
The main advantages of preprocessors:
If preprocessors are so good, then why did the developers always use them always? There are several reasons for this:
In fact, CSS already has everything you need for a layout. It is constantly developing, new properties and opportunities are added. Well, whether it is worth studying preprocessors - this is already every developer solves himself.
And now let's look at all this from the point of view of the customer. Suppose you need a website, and you choose the developer - one uses preprocessors, and the other is not. How to choose?
Preprocessor is just one of the tools for the layout. As a result, an ordinary CSS file will still get. And he was written manually or generated by the preprocessor - it does not matter.
A simple example is any wood master in its arsenal of the chisels and the planer. And when you order some crawler from him, it doesn't matter how it will be done. The master knows that it will require a planer to handle the board, and for cutting parts - the chisels.
So with the preprocessor CSS. The developer chooses himself, to use it or not. After all, in one case he will help him, and in the other it will only interfere. The use of this tool does not mean anything about the development of the developer and does not affect the quality of the site. Therefore, it is not worth focusing on this.