UNPKG

@designliquido/foles

Version:

Linguagem de folhas de estilo para documentos em geral em português

24 lines 1.08 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.LinearGradient = void 0; const cores_1 = require("../../../modificadores/atributos/cores"); const metodo_css_1 = require("./metodo-css"); class LinearGradient extends metodo_css_1.MetodoCss { constructor(valorAngulo, quantificadorAngulo, cor1, cor2) { super(); this.valorAngulo = Number(valorAngulo.lexema); this.quantificadorAngulo = quantificadorAngulo.lexema; this.cor1 = cor1.lexema; this.cor2 = cor2.lexema; this.traducao = "linear-gradient"; } paraTexto() { const cor1 = Object.keys(cores_1.cores).filter((key) => cores_1.cores[key] === this.cor1); this.cor1 = cor1.toString(); const cor2 = Object.keys(cores_1.cores).filter((key) => cores_1.cores[key] === this.cor2); this.cor2 = cor2.toString(); return `gradiente-linear(${this.valorAngulo}${this.quantificadorAngulo}, ${this.cor1}, ${this.cor2})`; } } exports.LinearGradient = LinearGradient; //# sourceMappingURL=linear-gradient.js.map