As I am in a preproduction cycle to develop an app, I am often changing visual in order to converge to what will be validated by the customer.
Some visuals of the same page (call it themes) would be interesting to keep so that I can present them quickly to the customer.
The way I found is to create an appearance class I put on body and by changing it I could change the page itself accordingly.
This said, I am interested in thematizing global less variable such as follows:
// default appearance
@navBarHeight: 50px;
.appearanceWhite {
@navBarHeight: 130px;
}
.appearanceBlack {
@navBarHeight: 70px;
}
This way, later in the .less, I come up with classes as follows:
#navBar {
height: @navBarHeight;
// appearance handling
.appearanceBlack & {
background-color: black;
}
.appearanceWhite & {
background-color: white;
}
}
Of course, the actual case if more complex.
Is it possible to define (or redefine) less variables depending on an appearance CSS class?