
Research
/Security News
npm Author Qix Compromised via Phishing Email in Major Supply Chain Attack
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
@armor/icons
Advanced tools
Webfont icons for Armor web applications.
All dependencies are installed with NPM by running npm install
.
This package is included as a dependency of Brandkit.
In most cases applications that will use this package, will also use Brandkit. If you only
need to use the icons, directly install the @armor/icons
package:
npm install --save-dev @armor/icons
Then reference the icons in your project's Sass file:
@import "../../node_modules/@armor/icons/src/icons-core";
@import "../../node_modules/@armor/icons/src/icons-infrastructure";
@import "../../node_modules/@armor/icons/src/icons-security";
To include an icon in markup, add the .ico
class for the specific icon you want to add.
<i class="ico ico-armor"></i>
It is possible to use other elements besides <i>
, however we strongly recommend standardizing
on the use of this element because it is deprecated in HTML5 and unused elsewhere throughout
our standard codebase.
You can add icons to custom classes by either using the @extend
syntax of Sass:
.my-custom-class {
@extend .ico;
@extend .ico-armor;
}
You can also use the bare components to construct a custom class:
.my-custom-class {
&::after {
font-family: 'icons-core';
display: block;
}
&.complete::after {
content: $ico-enable;
color: $green-700;
}
&.error::after {
content: $ico-exclamation-triangle;
color: $red-700;
}
}
Compilation of the webfont uses Gulp. You can trigger
a Gulp build by running npm run build
. This will compile the webfont from the source SVG
images.
To add an additional icon, simply add the SVG image to the module directory of the module
to which you want to add the icon. The image name will be used as the CSS class name, so
the filename should follow our CSS class naming convention (e.g. kebab-case-image.svg).
Once you've added the new SVG, run npm run build
again to make sure that it compiles
correctly.
Compilation re-generates and rewrites the HTML, SCSS, and CSS source files. Commit these files (including newly-added SVG files) back to source control.
Note: Be sure to check for alignment regressions after new builds.
Modules are separate SCSS/CSS payloads that allow a user of the package to import only subsets of icons that they need without having to facilitate CSS tree-shaking in their project.
To add a module, add a new directory in src/icons. Similarly to image names, the module names should also follow our naming convention (kebab-case). You'll also need to add the new module to config.json in the root of the project.
FAQs
Webfont icons for Armor web applications.
We found that @armor/icons demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers 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.
Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.