UNPKG

nehan

Version:

Html layout engine for paged-media written in Typescript

26 lines 765 B
import { ComplexSelector } from "./public-api"; export class CssRule { constructor(selector, style) { this.selector = selector; this.style = style; } toString() { return "(rule):" + this.selector.toString(); } test(element, matchAsPeOwner = false) { return this.selector.test(element, matchAsPeOwner); } get pseudoElementName() { return this.peSelector ? this.peSelector.tagName : ""; } get peSelector() { return this.selector.peSelector; } getPropertyValue(prop) { return this.style.getPropertyValue(prop); } static compare(rule1, rule2) { return ComplexSelector.compare(rule1.selector, rule2.selector); } } //# sourceMappingURL=css-rule.js.map