Files
postcss/lib/declaration.js
T
2015-04-03 13:57:15 +03:00

24 lines
588 B
JavaScript

import Node from './node';
export default class Declaration extends Node {
constructor(defaults) {
super(defaults);
this.type = 'decl';
}
stringify(builder, semicolon) {
let before = this.style('before');
if ( before ) builder(before);
let between = this.style('between', 'colon');
let string = this.prop + between + this.stringifyRaw('value');
if ( this.important ) {
string += this._important || ' !important';
}
if ( semicolon ) string += ';';
builder(string, this);
}
}