From b1de9dcc180e04f62603708076b82815bbedca14 Mon Sep 17 00:00:00 2001 From: Thomas Bui Date: Mon, 12 Oct 2020 14:12:27 -0700 Subject: [PATCH] Fix css color not including the aliases --- gulpfile.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gulpfile.js b/gulpfile.js index 9adce05c..2422acd5 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -101,13 +101,22 @@ function createColorsCSS(deviconJson) { font: fonts }, color, + aliases } = fontObj; if (fonts.length === 0 || typeof(color) !== "string") { console.log(`This object doesn't have a font or a color: ${name}`); return ""; } + + // process the icons in the font attr let cssClasses = fonts.map(font => `.devicon-${name}-${font}.colored`); + + // process the icons in the aliases attr + aliases.forEach(aliasObj => { + cssClasses.push(`.devicon-${name}-${aliasObj["alias"]}.colored`); + }); + return `${cssClasses.join(",")}{color: ${color}}`; }).join(" ");