@designliquido/foles
Version:
Linguagem de folhas de estilo para documentos em geral em português
29 lines • 1.15 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Styleset = void 0;
const metodo_css_1 = require("./metodo-css");
class Styleset extends metodo_css_1.MetodoCss {
constructor(valor1, valor2, valor3) {
super();
this.valor1 = Number(valor1.lexema);
this.valor2 = valor2 ? Number(valor2.lexema) : null;
this.valor3 = valor3 ? Number(valor3.lexema) : null;
this.traducao = "styleset";
}
paraTexto() {
if ((this.valor1 < 1 || this.valor1 > 20)
|| (this.valor2 && this.valor2 < 1 || this.valor2 > 20)
|| (this.valor3 && this.valor3 < 1 || this.valor3 > 20)) {
throw new Error('Os valores da função styleset() devem estar entre 1 e 20');
}
if (this.valor2 && this.valor3) {
return `conjunto-estilos(${this.valor1}, ${this.valor2}, ${this.valor3})`;
}
if (this.valor2) {
return `conjunto-estilos(${this.valor1}, ${this.valor2})`;
}
return `conjunto-estilos(${this.valor1})`;
}
}
exports.Styleset = Styleset;
//# sourceMappingURL=styleset.js.map