Can Visual Studio 2013 show mixins from referenced

2019-07-23 03:25发布

问题:

When I hover over a mixin it shows me the properties, which is awesome!

However, I have many referenced files and it does not show those. It says, "Undeclared mixin". Seems this would be a standard feature considering that many break up styles into like sections (reset, grid, fonts, etc.).

thanks.

回答1:

If I understand you correctly, you have imported less files and you would like to get intelliSense on things like mixins and variables when you hover over them.

This can be done by referencing the files in the same way you would with JavaScript files.

Example

/// <reference path="mixins.less" />

@import "mixins.less";

.some-mixin;

You can now hover over the mixin and see what it does!