Blix
Blix

Reputation: 289

How to pass a LESS variable into a class name

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?

Upvotes: 4

Views: 2047

Answers (1)

pinturic
pinturic

Reputation: 2263

Simply you can do it this way:

// Using variables
.one-@{columns}-inner {
    color: black;
}

Upvotes: 4

Related Questions