Answer the question
In order to leave comments, you need to log in
Do I need to use CSS preprocessors?
I haven't visited the toaster for a long time, and suddenly I came across a question about CSS preprocessors. It became interesting - what kind of animal.
I read several sites with a description of what it is and why. Looked at examples. But I did not understand - why? What's the point?
The gist of my question is:
1) Preprocessors allow you to introduce variables and mixins. But in CSS you can just create a property
.hello {
color:red;
font-size: 11px;
}
<a href="\" class="oneclass hello">hello</a>
.block {
.sub_block {
color: red;
}
}
.block > .sub_block {color:red;}
Answer the question
In order to leave comments, you need to log in
only the first paragraph is sufficient.
when you want to play around with fonts, colors, sizes and have to run through the entire file or files to change them, instead of editing variables in one place.
2) about nothing.
3) with the current volumes of disks and the size of these same compilers, it makes no sense to talk about this.
5) includes in the preprocessor make it possible to split the entire css into separate small and logical files that are easier to work with, and at the end they will be merged into one file, and not n different ones in the case of link rel . this is good in terms of client-side optimization, although it is not critical for hamsters.
whether you need it or not - decide for yourself.
Of course, there is no magic in preprocessors, and you can do without them. but they make your job easier and more productive.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question