stylus
Version:
Robust, expressive, and feature-rich CSS superset
53 lines (41 loc) • 784 B
JavaScript
/*!
* Stylus - Extend
* Copyright(c) 2010 LearnBoost <dev@learnboost.com>
* MIT Licensed
*/
/**
* Module dependencies.
*/
var Node = require('./node');
/**
* Initialize a new `Extend` with the given `selector`.
*
* @param {Selector} selector
* @api public
*/
var Extend = module.exports = function Extend(selector){
Node.call(this);
this.selector = selector;
};
/**
* Inherit from `Node.prototype`.
*/
Extend.prototype.__proto__ = Node.prototype;
/**
* Return a clone of this node.
*
* @return {Node}
* @api public
*/
Extend.prototype.clone = function(){
return new Extend(this.selector);
};
/**
* Return `@extend selector`.
*
* @return {String}
* @api public
*/
Extend.prototype.toString = function(){
return '@extend ' + this.selector;
};