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

Sourcemap will not link to correct line if media query is nested inside selector #2974

Open
morganfeeney opened this issue Oct 11, 2016 · 1 comment

Comments

@morganfeeney
Copy link

morganfeeney commented Oct 11, 2016

When I compile Less with a sourcemap, and in the less file nest a media query inside a selector like so:

.post .title {
  @media(min-width: 700px) {
    display: flex;
  }
}

...and then use Chrome inspector to find the ruleset, I find it is always at the end of the file. However when I nest the entire ruleset in a media query like so:

@media(min-width: 700px) {
  .post .title {
    display: flex;
  }
}

...there is no problem and can find the ruleset on the correct line in the sourcemap, as opposed to at the end of the file.

If it helps I am using Node and compile Less v2.5.3 using grunt and the plugin grunt-contrib-less, I'm not sure if it is a Less issue and was wondering if this is something to be expected with Less sourcemaps.

@morganfeeney morganfeeney changed the title Sourcemap will not link to correct line if media query is inside selector Sourcemap will not link to correct line if media query is nested inside selector Oct 11, 2016
@morganfeeney
Copy link
Author

Is this getting prioritised anytime soon?

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

No branches or pull requests

2 participants