mirror of
https://github.com/less/less.js.git
synced 2026-02-10 06:55:09 -05:00
Add Sass like extend
This commit is contained in:
@@ -23,6 +23,12 @@ tree.Ruleset.prototype = {
|
||||
// push the current ruleset to the frames stack
|
||||
env.frames.unshift(ruleset);
|
||||
|
||||
// currrent selectors
|
||||
if (!env.selectors) {
|
||||
env.selectors = [];
|
||||
}
|
||||
env.selectors.unshift(this.selectors);
|
||||
|
||||
// Evaluate imports
|
||||
if (ruleset.root || ruleset.allowImports || !ruleset.strictImports) {
|
||||
ruleset.evalImports(env);
|
||||
@@ -59,6 +65,7 @@ tree.Ruleset.prototype = {
|
||||
|
||||
// Pop the stack
|
||||
env.frames.shift();
|
||||
env.selectors.shift();
|
||||
|
||||
if (env.mediaBlocks) {
|
||||
for(var i = mediaBlockCount; i < env.mediaBlocks.length; i++) {
|
||||
|
||||
Reference in New Issue
Block a user