Answer the question
In order to leave comments, you need to log in
How to access a property in less/sass?
The essence of the question is simple.
For example, we have this code:
h1 {
color: red;
&:hover {
color: .that(color); // Эта строчка работать конечно же не будет, но её смысл я думаю понятен
color: &(color); // Или так, но тоже не работает
}
}
Answer the question
In order to leave comments, you need to log in
Long story short, I found a solution. The other day I decided to switch to stylus and there is this feature.
Everything will be written like this:
h1 {
color: this_color = red;
&:hover {
color: this_color;
}
}
h1 {
color: red;
&:hover {
color: @color;
}
}
color = #FFF;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question