Skip to content

Less could use stricter name resolution #2229

@jonsa

Description

@jonsa

I'm not sure if I should call this a bug or a feature request, but this recently bit me.

this is simplified code and not production code

.placeholder(@color: #333333) {
    &::-webkit-input-placeholder  { color: @color; }
}
input {
    .placeholder();
}
.placeholder {
    background: #ffffff;
}

which will output

input {
    background: #ffffff;
}
input::-webkit-input-placeholder {
    color: #333333;
}
.placeholder {
    background: #ffffff;
}

I'm not sure if this is by design, but I propose stricter name resolution where .name != .name()

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions