Skip to content

@import (reference) and @media #2547

Closed
Closed
@SebastienDaniel

Description

@SebastienDaniel

Using Grunt-contrib-less (1.0.1)

When importing a .less file containing @media queries, the styles within @media are imported even if the import directive is set to (reference), below is an example:

imported.less

@someColor: #121311;

h1 {
  color: @someColor;
}

@media (min-width: 600px) {
  h2 {
    color: #000;
  }
}

importer.less

@import (reference) "imported.less";

will output:

@media (min-width: 600px) {
  h2 {
    color: #000;
  }
}

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