Skip to content

Commit b1de9dc

Browse files
committed
Fix css color not including the aliases
1 parent efa33b8 commit b1de9dc

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

gulpfile.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,22 @@ function createColorsCSS(deviconJson) {
101101
font: fonts
102102
},
103103
color,
104+
aliases
104105
} = fontObj;
105106

106107
if (fonts.length === 0 || typeof(color) !== "string") {
107108
console.log(`This object doesn't have a font or a color: ${name}`);
108109
return "";
109110
}
111+
112+
// process the icons in the font attr
110113
let cssClasses = fonts.map(font => `.devicon-${name}-${font}.colored`);
114+
115+
// process the icons in the aliases attr
116+
aliases.forEach(aliasObj => {
117+
cssClasses.push(`.devicon-${name}-${aliasObj["alias"]}.colored`);
118+
});
119+
111120
return `${cssClasses.join(",")}{color: ${color}}`;
112121
}).join(" ");
113122

0 commit comments

Comments
 (0)