nav ul {
#defaults > .nav_list;
}
作用域(scope)
作用域是程序中的一个标准,LESS中也是。如果你在你样式表的root级声明一个变量,它在整个文档中都是可以调用的。然而,如果你在一个选择器,比如id或者class中,重新定义了这个变量,那么,它就只能在这个选择器中可用了——当然是重新定义后的新值。
/* You can also use the previously mentioned interpolation: */
@string: 'howdy';
@var: ~`'@{string}'.topUpperCase()`; /* becomes 'HOWDY' */
/* Here we access part of the document */
@height = `document.body.clientHeight`;
输出格式
然而LESS并没有输出设置,而Sass提供4中输出选项:nested, compact, compressed 和 expanded。