mirror of
https://github.com/hanzoai/postcss.git
synced 2026-09-24 17:01:56 +00:00
19 lines
528 B
JavaScript
19 lines
528 B
JavaScript
import Node from './node';
|
|
|
|
// CSS comment between declarations or rules
|
|
export default class Comment extends Node {
|
|
constructor(defaults) {
|
|
this.type = 'comment';
|
|
super(defaults);
|
|
}
|
|
|
|
// Stringify declaration
|
|
stringify(builder) {
|
|
var before = this.style('before');
|
|
if ( before ) builder(before);
|
|
var left = this.style('left', 'commentLeft');
|
|
var right = this.style('right', 'commentRight');
|
|
builder('/*' + left + this.text + right + '*/', this);
|
|
}
|
|
}
|