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

LESS (Fixed #346: source map path fixes & code refactoring) and Analysis (warning fixes) #344

Merged
merged 2 commits into from
Dec 23, 2013

Conversation

am11
Copy link
Contributor

@am11 am11 commented Dec 22, 2013

CA fixes for:

  • CA1002 // unsuppressed from ruleset and fixed in code

LESS Source Maps:

First off, there are three kinds of URLs we are dealing with:

  • Path to map file in compiled CSS file.
  • Path to LESS file in map file.
  • Path to CSS file in map file.

Unfortunately, there is no clear documentation and the SourceMap support in browsers is still unclear. For instance, by this thread less/less.js#1050, one can observe:

  • Chrome is the only browser supporting CSS source maps.
  • Chrome 29 used to accept only absolute URLs in source maps.
  • Chrome 32 supports the absolute as well as the relative to compiled CSS paths.

This fix (3a4950f) will devise all the paths from the compiled CSS file.

Since I haven't played with source maps much AND the information available online regarding this specific matter is quite insignificant which explicitly detail what kind of paths should we use. So I had to take inferences (from td.map, scss.map) and few assumptions.

Having said that, if someone is black-belt in SourceMaps and experiencing issues with Web essentials generated source maps' path, please explain the requirements and we shall fix it. Note that it will be a hassle to support absolute URLs in addition to relative URLs, but nonetheless, its definitely doable.

@SLaks
Copy link
Collaborator

SLaks commented Dec 23, 2013

Thanks for researching & fixing this!
We should also follow and/or contribute to https://wiki.mozilla.org/DevTools/Features/CSSSourceMap

@SLaks
Copy link
Collaborator

SLaks commented Dec 23, 2013

We should have unit tests for this too.

madskristensen added a commit that referenced this pull request Dec 23, 2013
LESS (Fixed #346: source map path fixes & code refactoring) and Analysis (warning fixes)
@madskristensen madskristensen merged commit c226c2d into madskristensen:master Dec 23, 2013
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

Successfully merging this pull request may close these issues.

3 participants