LESS allows you to define variables. That way, you can define a variable for the parent color, and then use it in a function lighten, as shown below:
@parentColor:
.jumbotron {
background-color: @parentColor; /* Using the parent color variable */
}
.Myjumbotron {
.jumbotron;
background-color: lighten(@parentColor, 30%); /* Lightening the parent color */
}
.. background-color, , CSS , .
1 : lighten darken , ScottS seven-phases-max .
2: ( 7-- comment)
( .jumbotron .myJumbotron .jumbotron), :
.jumbotron {
background-color:
color: white;
padding: 2em;
}
.Myjumbotron:extend(.jumbotron) {
@back: fade(white, 60%);
background-image: linear-gradient(@back, @back);
}
2