mirror of
https://github.com/hanzoai/postcss.git
synced 2026-09-24 17:01:56 +00:00
24 lines
547 B
JavaScript
24 lines
547 B
JavaScript
var Node = require('./node');
|
|
|
|
// CSS comment between declarations or rules
|
|
class Comment extends Node {
|
|
constructor(defaults) {
|
|
this.type = 'comment';
|
|
super(defaults);
|
|
}
|
|
|
|
// Default spaces for new node
|
|
defaultStyle() {
|
|
return { left: ' ', right: ' ' };
|
|
}
|
|
|
|
// Stringify declaration
|
|
stringify(builder) {
|
|
var style = this.style();
|
|
if ( this.before ) builder(this.before);
|
|
builder('/*' + style.left + this.text + style.right + '*/', this);
|
|
}
|
|
}
|
|
|
|
module.exports = Comment;
|