class size { _value; constructor(value) { this.value = value; } set value(content) { if (typeof(content) !== "number") { throw "Size must be numeric."; } this._value = content; } get value() { return this._value; } get _unit() { throw "This getter is abstract."; } get as_css() { return this._value.toString() + this._unit; } } class percent extends size { get _unit() { return "%"; } } class pixel extends size { get _unit() { return "px"; } } class emunit extends size { get _unit() { return "em"; } } class width_percent extends size { get _unit() { return "wv"; } } class height_percent extends size { get _unit() { return "hv"; } } class auto extends size { get _unit() { return ""; } constructor() { super(0); } set _value(content) { throw "Auto have no value."; } get _value() { throw "Auto have no value."; } get as_css() { return "auto"; } } export { size, percent, pixel, emunit, width_percent, height_percent, auto };