Sha256: a913f1317ba3f4ab2a7806a532400b0aed8da97873e15c1e5042aeeff532e5a2
Contents?: true
Size: 1.29 KB
Versions: 18
Compression:
Stored size: 1.29 KB
Contents
/*! * Stylus - Keyframes * Copyright(c) 2010 LearnBoost <dev@learnboost.com> * MIT Licensed */ /** * Module dependencies. */ var Node = require('./node'); /** * Initialize a new `Keyframes` with the given `name`, * and optional vendor `prefix`. * * @param {String} name * @param {String} prefix * @api public */ var Keyframes = module.exports = function Keyframes(name, prefix){ Node.call(this); this.name = name; this.frames = []; this.prefix = prefix || 'official'; }; /** * Inherit from `Node.prototype`. */ Keyframes.prototype.__proto__ = Node.prototype; /** * Push the given `block` at `pos`. * * @param {Unit} pos * @param {Block} block * @api public */ Keyframes.prototype.push = function(pos, block){ this.frames.push({ pos: pos , block: block }); }; /** * Return a clone of this node. * * @return {Node} * @api public */ Keyframes.prototype.clone = function(){ var clone = new Keyframes(this.name); clone.lineno = this.lineno; clone.prefix = this.prefix; clone.frames = this.frames.map(function(node){ node.block = node.block.clone(); return node; }); return clone; }; /** * Return `@keyframes name`. * * @return {String} * @api public */ Keyframes.prototype.toString = function(){ return '@keyframes ' + this.name; };
Version data entries
18 entries across 18 versions & 1 rubygems