3 exports.__esModule = true;
5 var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
7 var _container = require('./container');
9 var _container2 = _interopRequireDefault(_container);
11 var _warnOnce = require('./warn-once');
13 var _warnOnce2 = _interopRequireDefault(_warnOnce);
15 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17 function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19 function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
21 function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
23 var AtRule = function (_Container) {
24 _inherits(AtRule, _Container);
26 function AtRule(defaults) {
27 _classCallCheck(this, AtRule);
29 var _this = _possibleConstructorReturn(this, _Container.call(this, defaults));
31 _this.type = 'atrule';
35 AtRule.prototype.append = function append() {
36 var _Container$prototype$;
38 if (!this.nodes) this.nodes = [];
40 for (var _len = arguments.length, children = Array(_len), _key = 0; _key < _len; _key++) {
41 children[_key] = arguments[_key];
44 return (_Container$prototype$ = _Container.prototype.append).call.apply(_Container$prototype$, [this].concat(children));
47 AtRule.prototype.prepend = function prepend() {
48 var _Container$prototype$2;
50 if (!this.nodes) this.nodes = [];
52 for (var _len2 = arguments.length, children = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
53 children[_key2] = arguments[_key2];
56 return (_Container$prototype$2 = _Container.prototype.prepend).call.apply(_Container$prototype$2, [this].concat(children));
59 /* istanbul ignore next */
62 _createClass(AtRule, [{
65 (0, _warnOnce2.default)('AtRule#afterName was deprecated. Use AtRule#raws.afterName');
66 return this.raws.afterName;
69 /* istanbul ignore next */
71 set: function set(val) {
72 (0, _warnOnce2.default)('AtRule#afterName was deprecated. Use AtRule#raws.afterName');
73 this.raws.afterName = val;
76 /* istanbul ignore next */
81 (0, _warnOnce2.default)('AtRule#_params was deprecated. Use AtRule#raws.params');
82 return this.raws.params;
85 /* istanbul ignore next */
87 set: function set(val) {
88 (0, _warnOnce2.default)('AtRule#_params was deprecated. Use AtRule#raws.params');
89 this.raws.params = val;
94 }(_container2.default);
96 exports.default = AtRule;
97 module.exports = exports['default'];