Skip to content

No proper checking with using quotes. #1863

@b01

Description

@b01

I can write invalid CSS like this and LESS will still compile:

.test {
    background: url('/test-image.png); filter(Opacity=50 Aplha');
    /* Notice the missing quote after .png. But there is one after the Alpha, so no error is thrown. */
}

@images: 'test/';
.test2 {
    background: url({@images}/test-image.png);
    /* @{image} will not be replaced because it is not in quotes. However no error will be thrown. */
}

Output:

.test {
  background: url('/test-image.png); filter(Opacity=50 Aplha');
  /* Notice the missing quote after .png. But there is one after the Alpha, so no error is thrown. */
}
.test2 {
  background: url({@images}/test-image.png);
  /* @{image} will not be replaced because it is not in quotes. However no error will be thrown. */
}

Not a big deal, but would help if LESS threw errors on this stuff.

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