UNPKG

happy-dom

Version:

Happy DOM is a JavaScript implementation of a web browser without its graphical user interface. It includes many web standards from WHATWG DOM and HTML.

23 lines 592 B
import CSSRule from '../CSSRule.js'; import CSSRuleTypeEnum from '../CSSRuleTypeEnum.js'; /** * CSSRule interface. */ export default class CSSSupportsRule extends CSSRule { type = CSSRuleTypeEnum.supportsRule; cssRules = []; conditionText = ''; /** * Returns css text. * * @returns CSS text. */ get cssText() { let cssText = ''; for (const cssRule of this.cssRules) { cssText += cssRule.cssText; } return `@supports ${this.conditionText} { ${cssText} }`; } } //# sourceMappingURL=CSSSupportsRule.js.map