Rule.js 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. "use strict";
  2. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  3. 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); } }
  4. function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
  5. // Generated by CoffeeScript 2.5.1
  6. var DeclarationBlock, Rule, Selector;
  7. Selector = require('./rule/Selector');
  8. DeclarationBlock = require('./rule/DeclarationBlock');
  9. module.exports = Rule = /*#__PURE__*/function () {
  10. function Rule(selector) {
  11. _classCallCheck(this, Rule);
  12. this.selector = new Selector(selector);
  13. this.styles = new DeclarationBlock();
  14. }
  15. _createClass(Rule, [{
  16. key: "setStyles",
  17. value: function setStyles(styles) {
  18. this.styles.set(styles);
  19. return this;
  20. }
  21. }]);
  22. return Rule;
  23. }();