Answer the question
In order to leave comments, you need to log in
How to put Less into practice?
Maybe someone has seen a video tutorial or an article about Less, where, using the example of project layout, it is shown how this preprocessor can be used as efficiently as possible.
1. How to effectively apply impurities, where they are needed and where they are not;
2. The use of cycles on the example of creating a layout for a site;
3. Organization of the code, is it worth splitting less into files (blocks);
Well, etc.
All this will help to write the most optimized code,
Answer the question
In order to leave comments, you need to log in
if you are just starting to learn anyway, switch to the sass side) and you will immediately find a lot of guides and video tutorials and everything else)
By the way, recently he began to take an interest.
Here this resource can help: sass-scss.ru
And here is this one: leafo.net/scssphp
Specifically, you can use it and even write your own wrapper. Or use ready-made modules based on it, for example, in wordpress:
https://ru.wordpress.org/plugins/wp-scss/
or Bitrix:
marketplace.1c-bitrix.ru/solutions/olegpro.csscompiler
Everything is intuitively clear there. The compiler works well. The rest can be gleaned from sass-scss.ru
I found a good video review about the Less preprocessor. The author speaks fluently, but shows many interesting nuances.
www.youtube.com/playlist?list=PLX2yKxdx7ck-Ex9XFu8...
How to apply LESS is up to you, because there is no "optimized code". Everyone does what is faster and more convenient for him. IMHO, it is much more important to document the code, and how it will be written is not so important.
1. It is very convenient to use them when the property has a lot of prefixes for different browsers, such as transition, border-radius, transform, etc. Example:
.transition (@option: all, @time: 0.15s, @type: ease-in-out) {
-webkit-transition: @option @time @type;
-moz-transition: @option @time @type;
-o-transition: @option @time @type;
transition: @option @time @type;
}
.block {
.transition;
}
.block2 {
.transition(@option: height);
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question