Skip to content

Send Class with Function Variable #1569

Closed
@kalaomer

Description

@kalaomer

Hi!

I'm trying to add class rules with variable.

My code:

.some-div-adress(@class) {
    .some-div {
        @class; 
    }
}

#main-div {
    .some-div-adress(.add-class);
}

.add-class() {
  width: 100px;
}

End I want to this out put:

#main-div .some-div .add-class {
    width: 100px;
}

How can I get this output with Less?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions