What the CSS Icon Exporter does
The CSS Icon Exporter turns icons into ready-to-use CSS classes, so you can show an icon with a single <i class="icon-check"></i>. Choose the mask method, where icons take the text colour of their surroundings, or the background method with a fixed colour. Pick icons from the Kitlantis library or add your own SVGs, and download icons.css with a preview page.
How to use it
- Select the icons you need, and add your own SVGs if you like.
- Choose Mask or Background image, and a colour for the background method.
- Set the class prefix and the size, such as 1.25em, so icons scale with text.
- Copy the CSS or download icons.css with preview.html, then add the stylesheet to your site.
Example
A form needs check, close and arrow icons inside buttons. Export them with the mask method and a size of 1.25em. Then <button><i class="icon-check"></i> Save</button> shows a tick in the button’s own text colour, and changes colour automatically when the button is disabled or hovered.
Mask or background?
The mask method uses the icon as a stencil over a block of the current text colour, so one class works in any colour and in dark mode. It works in all current browsers. The background method draws the icon as an image in a fixed colour, which suits places where the colour never changes.
Icons are embedded as small data URLs inside the CSS, so there are no extra files to host or requests to make.
Questions people ask
Are my files uploaded?
No. Files are read and processed in your browser and never uploaded.
How big is the CSS?
A few hundred bytes per icon. The status line shows the exact total.
Can I change an icon’s size?
Set the size option, or override width and height in your own CSS.
Do these icons work in emails?
Masks are not supported in most email apps. Use PNG icons for emails.