Flaticon Icon Font Documentation

This documentation covers all files related to the Flaticon icon font in the linuxfront-v2-logistics/css/flaticons/ folder. You’ll learn how the demo page works, how the icon font is defined, and how to integrate it into your project.


flaticon.html – Demo & Usage 📄

A self-contained HTML page showcasing the Flaticon icon font. It resets browser defaults, loads the font, and displays every available glyph with usage instructions and attribution .

Structure

  • Global Reset: CSS reset for consistent cross-browser styling.
  • Head Section:
    • Google Font: Varela Round
    • Link to generated flaticon.css
  • Inline Styles: Base typography, colors, and icon pseudo-element styling.
  • Header: Brand logo SVG and demo title.
  • Instructions: Step-by-step guide on installing and using the icon font.
  • Glyph Grid: Visual list of every icon, class name, and author credit.
  • Attribution: License and author credits with copy-and-paste HTML snippet.
  • Examples: Quick code samples showing how to embed icons.
  • Footer: Link back to flaticon.com.

Key Code Snippets

Linking the CSS

<link rel="stylesheet" type="text/css" href="flaticon.css">

This stylesheet is compiled from the SCSS configuration and must be accessible alongside the font files .

Usage Instructions Section

<ul>
  <li>
    <span class="num">1</span>
    Copy the font files and `flaticon.css` into your site’s CSS folder.
  </li>
  <li>
    <span class="num">2</span>
    Add the `<link rel="stylesheet" href="flaticon.css">` tag in your `<head>`.
  </li>
  <li>
    <span class="num">3</span>
    Use an inline element with the icon class:
    <code>&lt;i class="flaticon-airplane49"&gt;&lt;/i&gt;</code>
  </li>
</ul>

Icons are inserted via CSS pseudo-elements on classes beginning with flaticon- .

Glyph Grid Item

Element Purpose
<div class="glyph-icon flaticon-2412"> Renders the icon via :before pseudo-element
<div class="class-name">.flaticon-2412</div> Shows the CSS class name
<div class="author-name">...Freepik</div> Credits the icon’s author with a link

_flaticon.scss – Font Definition & Icon Classes 💅

The SCSS file defines the Flaticon font and generates a CSS class for each glyph. Compile this to flaticon.css using your build tools (e.g., Sass, webpack) .

1. Font-Face Declaration

@font-face {
  font-family: "Flaticon";
  src: url("./Flaticon.eot");
  src: url("./Flaticon.eot?#iefix") format("embedded-opentype"),
       url("./Flaticon.woff") format("woff"),
       url("./Flaticon.ttf") format("truetype"),
       url("./Flaticon.svg#Flaticon") format("svg");
  font-weight: normal;
  font-style: normal;
}

Loads multiple formats for broad browser support .

2. Base Icon Styling

.fi:before {
  display: inline-block;
  font-family: "Flaticon";
  font-style: normal;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

The .fi mixin (or base class) ensures icons render smoothly and align correctly.

3. Icon Class Mappings

Each icon gets a unique CSS class mapping to its Unicode codepoint:

.flaticon-2412:before { content: "\f100"; }
.flaticon-accounting:before { content: "\f102"; }
.flaticon-delivery5:before { content: "\f122"; }
/* … hundreds more … */

Use these classes in your HTML to display the corresponding glyph .


license.txt – License Information 📜

Provides the URL to download the license for this icon set:

You can download your license here:
https://profile.flaticon.com/license/fi/SwkgUxJEL3JglsTgaFIv-7

Ensure you comply with the Creative Commons terms when using these icons .


Integration Workflow

Below is a simple flowchart illustrating how SCSS, CSS, HTML, and the font files work together:

flowchart LR
  subgraph Build_Process
    SCSS[_flaticon.scss] -- Compile --> CSS[flaticon.css]
  end
  Fonts[Flaticon Font Files] -- Copy --> CSS
  CSS -- Link in header --> HTML[flaticon.html]
  HTML -- Render icons --> Browser(Browser View)
  1. Compile _flaticon.scss into flaticon.css.
  2. Copy the font files (.eot, .woff, .ttf, .svg) into the same directory.
  3. Link flaticon.css in your site’s <head>.
  4. Use <i class="flaticon-..."></i> or <span class="flaticon-..."></span> to render icons.

With this setup, you’ll have a robust, scalable icon system that’s easy to maintain and extend.