Skip to content

Commit f871d09

Browse files
Release 15.0.0
2 parents df90e03 + 76c4e1a commit f871d09

9 files changed

Lines changed: 241 additions & 72 deletions

File tree

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,13 @@ Where `[ICON NAME]` is replaced by the icon name, for example:
7777
<i class="si si-simpleicons si--color"></i>
7878
```
7979

80+
Or use the fit style font, all font will rendered in the same height:
81+
82+
```html
83+
<i class="si-fit si-simpleicons"></i>
84+
<i class="si-fit si-simpleicons si--color"></i>
85+
```
86+
8087
In this example we use the `<i>` tag, but any inline HTML tag should work as you expect.
8188

8289
## Custom Builds

package-lock.json

Lines changed: 26 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "simple-icons-font",
3-
"version": "14.15.0",
3+
"version": "15.0.0",
44
"description": "Icon font generated from https://simpleicons.org",
55
"homepage": "https://www.simpleicons.org",
66
"keywords": [
@@ -46,7 +46,8 @@
4646
"rimraf": "6.0.1",
4747
"semver": "7.7.1",
4848
"serve": "14.2.4",
49-
"simple-icons": "14.15.0",
49+
"simple-icons": "15.0.0",
50+
"svg-path-bbox": "2.1.0",
5051
"svg2ttf": "6.0.3",
5152
"svgpath": "2.6.0",
5253
"ttf2eot": "3.1.0",

preview/assets/script.js

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
document.addEventListener('DOMContentLoaded', () => {
22
const $body = document.querySelector('body');
3-
const $icons = document.getElementsByClassName('si');
3+
const $icons = document.getElementsByTagName('i');
44
const $backgroundModeButton = document.querySelector('.background-mode');
55
const $iconsColorButton = document.querySelector('.icons-color');
6+
const $iconsStyleButton = document.querySelector('.icons-style');
67

78
// Background dark/light mode toggler
89
$backgroundModeButton.addEventListener('click', () => {
@@ -26,4 +27,27 @@ document.addEventListener('DOMContentLoaded', () => {
2627
$icons[i].classList.toggle('si--color');
2728
}
2829
});
30+
31+
// Icons style toggle
32+
$iconsStyleButton.addEventListener('click', () => {
33+
const isFit = $icons[0].classList.contains('si-fit');
34+
if (isFit) {
35+
$iconsStyleButton.innerText = 'Fit';
36+
} else {
37+
$iconsStyleButton.innerText = 'Regular';
38+
}
39+
40+
for (let i = 0; i < $icons.length; i++) {
41+
if ($icons[i].classList.contains('style-immutable')) {
42+
continue;
43+
}
44+
if (isFit) {
45+
$icons[i].classList.remove('si-fit');
46+
$icons[i].classList.add('si');
47+
} else {
48+
$icons[i].classList.remove('si');
49+
$icons[i].classList.add('si-fit');
50+
}
51+
}
52+
});
2953
});

preview/assets/style.css

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ body.dark {
1919
cursor: pointer;
2020
}
2121

22-
i.si {
22+
i.si,
23+
i.si-fit {
2324
display: inline-block;
2425
cursor: help;
2526
}
@@ -28,7 +29,8 @@ p.grid {
2829
font-size: 32px;
2930
}
3031

31-
p.grid i.si {
32+
p.grid i.si,
33+
p.grid i.si-fit {
3234
margin: 0 4px;
3335
padding: 4px;
3436
border: 1px dashed gray;

preview/html/testpage.pug

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ body
1515
.buttons-list
1616
button.background-mode Dark background
1717
button.icons-color Colorless icons
18+
button.icons-style Fit
1819

1920
p.grid
2021
each icon in icons
@@ -24,3 +25,7 @@ body
2425
| An icon like #[i.si.si--color.si-github(title='Github')] inside a paragraph.
2526
p.paragraph
2627
| An icon like #[em #[i.si.si--color.si-github(title='Github')]] in italics inside a paragraph.
28+
p.paragraph
29+
| The icon in regular style #[i.si.si--color.si-go.style-immutable(title='Go')] in a paragraph.
30+
p.paragraph
31+
| The wide icon in fit style #[i.si-fit.si--color.si-go.style-immutable(title='Go')] in a paragraph.

0 commit comments

Comments
 (0)