I am trying to put font family for a div if the variable is not equal to null. my less code is
div.content {
& when (isstring(@contentFont)) {
font-family: @contentFont;
}
}
the output that I get from css is
div.content when (isstring(@contentFont)) {
font-family: Abel;
}
my problem is, the style is not applying for the div.content, not sure what i am doing wrong. Any help would be greatly appreciated.
when...part should not be coming in the output at all.whensyntax was introduced, and as Harry says are you sure you're correctly compiling the LESS to CSS (and not getting errors) as that is not compiled CSS.whencondition in the csswhen?