fix: allow icon sizing with css (#232)

Resolves #218
This commit is contained in:
Sam Marks 2023-01-16 10:54:05 -05:00 committed by GitHub
parent 0d787b524c
commit 773d84f287
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 4 deletions

View file

@ -63,7 +63,7 @@ You can switch between icons from the right sidebar in the editor.
Import the CSS File:
```html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/lucaburgio/iconoir@main/css/iconoir.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/iconoir-icons/iconoir@main/css/iconoir.css">
```
Here is an example in HTML:
@ -73,6 +73,9 @@ Here is an example in HTML:
```
The class must always be "iconoir-" and then the name of the icon. You can find the names of the icons [here](https://iconoir.com).
The icons are `display: inline-block` and default to the current font size. You can control this
by adjusting the `::before` styles of the element (which is where the icons are added as a mask).
## Figma
The library is available in the Figma community [here](https://www.figma.com/community/file/983248991460488027/Iconoir-Pack).

View file

@ -85,7 +85,9 @@ const tasks = new Listr(
path.join(__dirname, '../icons/', file)
)
.toString()
.replace(/\n/g, '');
.replace(/\n/g, '')
.replace(/(width|height)="[0-9]+"/g, '')
.replace(/[ ]+/g, ' ');
content.push(
`.iconoir-${
path.parse(file).name

View file

@ -17,5 +17,5 @@
}
*[class^="iconoir-"],
*[class*=" iconoir-"] {
display: block;
display: inline-block;
}

File diff suppressed because one or more lines are too long