mirror of
https://github.com/konpa/devicon.git
synced 2025-08-06 14:46:46 +02:00
Added colored class and change README.md
This commit is contained in:
@@ -43,13 +43,11 @@ _2 ways of using devicon:_
|
|||||||
|
|
||||||
#### Icons font
|
#### 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
|
```html
|
||||||
<link rel="stylesheet" href="devicon.css">
|
<link rel="stylesheet" href="devicon.min.css">
|
||||||
|
|
||||||
<!-- if you want colored versions -->
|
|
||||||
<link rel="stylesheet" href="devicon-colors.css">
|
|
||||||
```
|
```
|
||||||
|
|
||||||
- Add icon using `<i>` tag
|
- Add icon using `<i>` tag
|
||||||
|
@@ -107,7 +107,7 @@ function createColorsCSS(deviconJson) {
|
|||||||
console.log(`This object doesn't have a font or a color: ${name}`);
|
console.log(`This object doesn't have a font or a color: ${name}`);
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
let cssClasses = fonts.map(font => `.devicon-${name}-${font}`);
|
let cssClasses = fonts.map(font => `.devicon-${name}-${font}.colored`);
|
||||||
return `${cssClasses.join(",")}{color: ${color}}`;
|
return `${cssClasses.join(",")}{color: ${color}}`;
|
||||||
}).join(" ");
|
}).join(" ");
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user