1
0
mirror of https://github.com/konpa/devicon.git synced 2025-04-21 05:11:56 +02:00

Added colored class and change README.md

This commit is contained in:
Thomas Bui 2020-10-09 15:03:30 -07:00
parent 940fd13c13
commit 318e2df2b7
2 changed files with 4 additions and 6 deletions

View File

@ -43,13 +43,11 @@ _2 ways of using devicon:_
#### Icons font
- Upload devicon.css and font files to your project
- Upload devicon.min.css and font files to your project
- Note: the `devicon.css` file is not the same as the `devicon.min.css`. It doesn't contain any colors or aliases.
```html
<link rel="stylesheet" href="devicon.css">
<!-- if you want colored versions -->
<link rel="stylesheet" href="devicon-colors.css">
<link rel="stylesheet" href="devicon.min.css">
```
- Add icon using `<i>` tag

View File

@ -107,7 +107,7 @@ function createColorsCSS(deviconJson) {
console.log(`This object doesn't have a font or a color: ${name}`);
return "";
}
let cssClasses = fonts.map(font => `.devicon-${name}-${font}`);
let cssClasses = fonts.map(font => `.devicon-${name}-${font}.colored`);
return `${cssClasses.join(",")}{color: ${color}}`;
}).join(" ");