版博士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.
 
 
 
 

41 lines
1.1 KiB

  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. const CSSStyleDeclaration_1 = __importDefault(require("../declaration/CSSStyleDeclaration"));
  8. /**
  9. * CSSRule interface.
  10. */
  11. class CSSKeyframeRule extends CSSRule_1.default {
  12. constructor() {
  13. super(...arguments);
  14. this.type = CSSRule_1.default.KEYFRAME_RULE;
  15. this._cssText = '';
  16. this._style = null;
  17. }
  18. /**
  19. * Returns style.
  20. *
  21. * @returns Style.
  22. */
  23. get style() {
  24. if (!this._style) {
  25. this._style = new CSSStyleDeclaration_1.default();
  26. this._style.parentRule = this;
  27. this._style.cssText = this._cssText;
  28. }
  29. return this._style;
  30. }
  31. /**
  32. * Returns css text.
  33. *
  34. * @returns CSS text.
  35. */
  36. get cssText() {
  37. return `${this.keyText} { ${this.style.cssText} }`;
  38. }
  39. }
  40. exports.default = CSSKeyframeRule;
  41. //# sourceMappingURL=CSSKeyframeRule.js.map