0

Hi i have to add the class "hide" to input element which having the class "display".

<input type="text" id="Text" class="display"/>

Is any ways to add the class to element from less?

Roy thomas
  • 115
  • 1
  • 8
  • 1
    Possible duplicate of [Dynamic class to element with Less](http://stackoverflow.com/questions/27617789/dynamic-class-to-element-with-less) – Iceman Aug 11 '16 at 04:21

3 Answers3

1

Try this:

.hide{
    background-color:blue;
 }
 .display{
   color:red;
   .hide;
 }
0

you can add

input .display {
  .hide{
   //css
  }
}
Gynteniuxas
  • 7,035
  • 18
  • 38
  • 54
0

This will work..

HTML

<input type="text" class="display"/>

LESS

.hide {
  color: red;
}
input {
  &.display {
    .hide ();
  }
}