Sha256: 291c6b4dd65cb9f4be185d61db3bb34373978b0dfe79e4a630c8d29ffc566597

Contents?: true

Size: 702 Bytes

Versions: 8

Compression:

Stored size: 702 Bytes

Contents

(function (tree) {

tree.Selector = function (elements) {
    this.elements = elements;
    if (this.elements[0].combinator.value === "") {
        this.elements[0].combinator.value = ' ';
    }
};
tree.Selector.prototype.match = function (other) {
    if (this.elements[0].value === other.elements[0].value) {
        return true;
    } else {
        return false;
    }
};
tree.Selector.prototype.toCSS = function (env) {
    if (this._css) { return this._css }

    return this._css = this.elements.map(function (e) {
        if (typeof(e) === 'string') {
            return ' ' + e.trim();
        } else {
            return e.toCSS(env);
        }
    }).join('');
};

})(require('less/tree'));

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
less-2.0.7 lib/less/js/lib/less/tree/selector.js
less-2.0.6 lib/less/js/lib/less/tree/selector.js
less-2.0.5 lib/less/js/lib/less/tree/selector.js
less-2.0.4 lib/less/js/lib/less/tree/selector.js
less-2.0.3 lib/less/js/lib/less/tree/selector.js
less-2.0.2 lib/less/js/lib/less/tree/selector.js
less-2.0.1 lib/less/js/lib/less/tree/selector.js
less-2.0.0 lib/less/js/lib/less/tree/selector.js