版博士V2.0程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

31 lines
896 B

  1. "use strict";
  2. var __importDefault = (this && this.__importDefault) || function (mod) {
  3. return (mod && mod.__esModule) ? mod : { "default": mod };
  4. };
  5. Object.defineProperty(exports, "__esModule", { value: true });
  6. const CSSRule_1 = __importDefault(require("../CSSRule"));
  7. /**
  8. * CSSRule interface.
  9. */
  10. class CSSContainerRule extends CSSRule_1.default {
  11. constructor() {
  12. super(...arguments);
  13. this.type = CSSRule_1.default.CONTAINER_RULE;
  14. this.cssRules = [];
  15. this.conditionText = '';
  16. }
  17. /**
  18. * Returns css text.
  19. *
  20. * @returns CSS text.
  21. */
  22. get cssText() {
  23. let cssText = '';
  24. for (const cssRule of this.cssRules) {
  25. cssText += cssRule.cssText;
  26. }
  27. return `@container ${this.conditionText} { ${cssText} }`;
  28. }
  29. }
  30. exports.default = CSSContainerRule;
  31. //# sourceMappingURL=CSSContainerRule.js.map