Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to pass a LESS variable into a class name

Tags:

css

less

I have a LESS variable: @columns: 12

I would like to pass this variable into a CSS class name ideally as: .one-{@columns}-inner {}

Is it possible?

like image 351
Blix Avatar asked Sep 12 '25 18:09

Blix


1 Answers

Simply you can do it this way:

// Using variables
.one-@{columns}-inner {
    color: black;
}
like image 162
pinturic Avatar answered Sep 15 '25 07:09

pinturic