@designliquido/foles
Version:
Linguagem de folhas de estilo para documentos em geral em português
41 lines • 1.81 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DropShadow = void 0;
const cores_1 = require("../../../modificadores/atributos/cores");
const metodo_css_1 = require("./metodo-css");
class DropShadow extends metodo_css_1.MetodoCss {
constructor(valor1, quantificador1, valor2, quantificador2, valor3, quantificador3, cor) {
super();
this.valor1 = Number(valor1.lexema);
this.quantificador1 = quantificador1.lexema;
this.valor2 = Number(valor2.lexema);
this.quantificador2 = quantificador2.lexema;
this.valor3 = valor3 ? Number(valor3.lexema) : null;
this.quantificador3 = quantificador3 ? quantificador3.lexema : null;
this.cor = cor ? cor.lexema : null;
this.traducao = "drop-shadow";
}
paraTexto() {
if (this.cor) {
for (const key in cores_1.cores) {
if (cores_1.cores[key] === this.cor) {
this.cor = key;
}
}
}
if (!this.valor3) {
if (!this.cor) {
return `projetar-sombra(${this.valor1}${this.quantificador1} ${this.valor2}${this.quantificador2})`;
}
else {
return `projetar-sombra(${this.valor1}${this.quantificador1} ${this.valor2}${this.quantificador2} ${this.cor})`;
}
}
else if (!this.cor) {
return `projetar-sombra(${this.valor1}${this.quantificador1} ${this.valor2}${this.quantificador2} ${this.valor3}${this.quantificador3})`;
}
return `projetar-sombra(${this.valor1}${this.quantificador1} ${this.valor2}${this.quantificador2} ${this.valor3}${this.quantificador3} ${this.cor})`;
}
}
exports.DropShadow = DropShadow;
//# sourceMappingURL=drop-shadow.js.map