UNPKG

nehan

Version:

Html layout engine for paged-media written in Typescript

37 lines 988 B
import { SpaceChar, CssCascade, } from "./public-api"; let MarkerText = { "none": SpaceChar.markerSpace, "disc": "\u2022", "circle": "\u25E6", "square": "\u25AA", }; export class ListStyleType { constructor(value) { this.value = value; } static load(element) { let value = CssCascade.getValue(element, this.property); return new ListStyleType(value); } isNone() { return this.value === "none"; } isTcyMarker() { return this.value === "decimal"; } getMarkerText(index) { switch (this.value) { case "none": case "circle": case "disc": case "square": return MarkerText[this.value]; case "decimal": return String(index + 1) + "."; default: return MarkerText["disc"]; } } } ListStyleType.property = "list-style-type"; //# sourceMappingURL=list-style-type.js.map