2023-08-17 09:47:40 +00:00
|
|
|
'use strict'
|
2022-01-21 08:28:41 +00:00
|
|
|
|
2023-08-17 09:47:40 +00:00
|
|
|
let Container = require('./container')
|
2022-01-21 08:28:41 +00:00
|
|
|
|
2023-08-17 09:47:40 +00:00
|
|
|
class AtRule extends Container {
|
|
|
|
constructor(defaults) {
|
|
|
|
super(defaults)
|
|
|
|
this.type = 'atrule'
|
2022-01-21 08:28:41 +00:00
|
|
|
}
|
|
|
|
|
2023-08-17 09:47:40 +00:00
|
|
|
append(...children) {
|
|
|
|
if (!this.proxyOf.nodes) this.nodes = []
|
|
|
|
return super.append(...children)
|
2022-01-21 08:28:41 +00:00
|
|
|
}
|
|
|
|
|
2023-08-17 09:47:40 +00:00
|
|
|
prepend(...children) {
|
|
|
|
if (!this.proxyOf.nodes) this.nodes = []
|
|
|
|
return super.prepend(...children)
|
|
|
|
}
|
|
|
|
}
|
2022-01-21 08:28:41 +00:00
|
|
|
|
2023-08-17 09:47:40 +00:00
|
|
|
module.exports = AtRule
|
|
|
|
AtRule.default = AtRule
|
2022-01-21 08:28:41 +00:00
|
|
|
|
2023-08-17 09:47:40 +00:00
|
|
|
Container.registerAtRule(AtRule)
|