Icons
Icon font#
Icons on the website use a custom icon set which are managed through IcoMoon. This tool makes changes to the icon set easy.

Modifying the icon set#
- Open the IcoMoon app
- Import the IcoMoon data file located in
src/Fonts/klemich-iconfont/selection.json. - Makes changes as required
- Generator and download the font as a zip
- Unzip the required contents of the icon font into
src/Fonts/klemich-iconfont - Update the icon variables located in
src/Css/Base/variables.scss, using the generated CSS styles, - Before deployment, update the cache-busting random hash on the font file imports in
src/Css/Base/fonts.scss. This will ensure users load new versions of the icon set rather than from cache
Usage#
In Sass#
You can target a pseudo-element, which can be populated with a font icon glyph.
- Include the
iconfont-iconSass mixin, which provides required font styles - Using the
contentproperty, reference an icon font glyph from the$iconsSass map by using the predefined get functioniconfont()
For example:
In HTML#
Much like other icon libraries, you can output icons using only CSS classes on HTML elements.
- Add the base CSS class
.iconto your element. This includes the same required font styles as theiconfont-iconSass mixin. - Add a BEM modifier class to match the name of the desired icon, e.g.
.icon--check.
For example:
This will output the icon as a CSS pseudo element on the :before selector. If you require to channel into the :after selector, you can swap out the .icon class for .icon-after.
See the Sass @each loop in src/Css/Base/fonts.scss for a better understanding how this works.