Search code examples
visual-studiodictionarylessweb-essentials

How to locate style in Less file


I have noticed that web essentials for visual studio creates a .css.map file when compiling less. Does this mean it is possible to navigate from a selector in the css file back to the selector in the associated less file? If so how?


Solution

  • In VS 2013, if you enable LESS preview window, you can leverage Go To Definition command on a selector in preview to highlight the corresponding selector in LESS source. (via right-click context menu or press F12 in preview window -- see #809). When applicable, it will also load the @imported document, where the source is available.

    On that note, there are precession issues with libsass' source-map. For that matter, it doesn't work well in SCSS editor.