Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nested media queries break postCSS source mapping #9

Open
Jexordexan opened this issue Jan 19, 2017 · 0 comments
Open

Nested media queries break postCSS source mapping #9

Jexordexan opened this issue Jan 19, 2017 · 0 comments

Comments

@Jexordexan
Copy link

Consider the following Less:

.nav-placeholder {
  height: 70px;
  @media (min-width: 700px) {
    height: 50px;
  }
}

This is valid Less, but throws an error in the console when map: true option is set in the postCSS config:

Fatal error: Invalid mapping: {"generated":{"line":1,"column":4349},"source":"../partials/nav.less","original":{"line":1,"column":-1},"name":null}

Curiously, the following works fine:

.nav {
  .nav-placeholder {
    height: 70px;
  }
  @media (min-width: 700px) {
    .nav-placeholder
      height: 50px;
    }
  }
}

Notice that the media query is still nested but the rules are contained in a selector block.

Not sure if this is a bug for the normal postcss repo but I'll see where this goes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant