Issue
Is there any option to set style for some element according to body id with LESS?
I need to do something like this:
@body_about = #about_page;
img when (isclass(@body_about)){
// some style
}
this img defintion is deeply buried and I do not want to draw it to the top of... Is there any option to do this? Thx for help.
Solution
This is a conjecture of what you need based off your comment about the "definition is deeply buried" and your first comment to MarmiK's answer. If I am way off what you need here, let me know and I'll remove my answer.
LESS
.someClass1 {
.someClass2 {
.someClass3 {
img {
/* normal code */
#about_page & {
/* about page code */
}
}
}
}
}
CSS Output
.someClass1 .someClass2 .someClass3 img {
/* normal code */
}
#about_page .someClass1 .someClass2 .someClass3 img {
/* about page code */
}
Answered By - ScottS Answer Checked By - Gilberto Lyons (PHPFixing Admin)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.