mercredi 25 avril 2018

Set variable to a new value if a specific class is present in LESS

It is easy to explain what I want using an example.

I want to achieve something like

.someClass {
   @aVariable: 100px;
   /*
   if(along with .someClass .anotherClass is present) {
      @aVariable = 200px;
   }
   */
   /*@aVariable is used here */
}

The point is to set @aVariable depending on the another class presence.

I saw the answer, but it did not work out for me.

Aucun commentaire:

Enregistrer un commentaire