Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Fine-tuned icon fonts integration for Sass, Less and Stylus.
Featuring the following icon sets:
Get the files you need over at /stylesheets/ and put it in your project.
Using bower makes files available via
bower_components/iconfonts/stylesheets/___.scss
.
bower install iconfonts
Using bower makes files available via
node_modules/iconfonts/stylesheets/___.scss
.
npm install iconfonts
This lets you use CSS definitions only for the icons you need, on the elements that you need them.
The CSS files that these fonts provide usually give you a lot of cruft, and defines all the classes in one giant file.
/* CSS */
.fa-user:before { content: '\f007'; }
.fa-film:before { content: '\f008'; }
.fa-th-large:before { content: '\f009'; }
... and 300 more
/* HTML */
<button class="btn btn-plus"><i class="fa fa-plus"></i> Add user</button>
I prefer to not have them in my CSS files unless I need them. This project lets you do that.
/* Stylus */
.btn-plus {
&:before { fa-icon: "plus"; margin-right: 10px; }
}
/* HTML */
<button class="btn-plus">Add user</button>
@import 'font-awesome';
/* embeds the @font-face. use this only once. */
@include fa-font();
button:before {
@include fa-icon("music", 14px);
}
See a Sass file for more info.
If you're on Rails (with sass-rails) and prefer to keep the files in your
project, download the font files to vendor/assets/images/
. Afterwards, use
xx-font-rails()
instead of xx-font()
to embed the @font-face. Usage is
otherwise the same as above.
@import 'font-awesome';
@include fa-font-rails();
@require font-awesome
fa-font()
button:before
fa-icon("music", 14px)
See a stylus file for more info.
@import 'font-awesome';
.fa-font();
button:before {
.fa-icon("music");
font-size: 14px;
}
See a less file for more info.
If you're on Rails (with less-rails) and prefer to keep the files in your
project, download the font files to vendor/assets/images/
. Afterwards, use
xx-font-rails()
instead of xx-font()
to embed the @font-face. Usage is
otherwise the same as above.
@import 'font-awesome';
.fa-font-rails();
Iconfonts © 2014+, Rico Sta. Cruz. Released under the MIT License.
Authored and maintained by Rico Sta. Cruz with help from contributors.
ricostacruz.com · GitHub @rstacruz · Twitter @rstacruz
v0.2.0
June 26, 2014
xxx-font-rails()
mixin for Rails integration.xxx-font-rails()
mixin for Rails integration.FAQs
Fine-tuned icon fonts integration for Sass, Less and Stylus.
The npm package iconfonts receives a total of 4,530 weekly downloads. As such, iconfonts popularity was classified as popular.
We found that iconfonts demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.