Icodrive

Documentation of useful icon font subclasses and functions

Connect a script to automatically update icons and javascript functions, and if you want font functions

<script type="text/javascript" src="https://cdn.yurba.one/static/icodrive/icons.js"></script>

Or use static css file

<link rel="stylesheet" src="https://cdn.yurba.one/static/icodrive/2.5/css/icodrive.min.css">

Styles

Fixed-width

.icd-fw

Default icon and with icd-fw

In-function: $function("fw")

Brand-color

.icd-brand-color

Default icon and with icd-brand-color

In-function: $function("bc")

Circle

.icd-circle

Default icon and with icd-circle

In-function: $function("circle")

Functions

Set

icd.set($className)

Sets the style on all .icd classes

Variability: fw, bc, circle or any classname

Remove

icd.remove($icon, $type, $overIcon)

Removes or replaces an icon or an icon's parent block

$icon variability: any icon code without .icd-

$type variability: remove (default), parent, overwrite

$overIcon variability: any icon code without .icd-

SetID

icd.setid()

Sets the "id" attribute of each .icd class with the value "icd-icon"

Set only

icd.setOnly($icon)

Works the same as the set() function, but only for a specific icon class

Variability: any icon code without .icd-

Settings

icd.settings[$version]

An array of variables that can be changed. Contains font configuration information

Variability: All font versions, example: 1-5

Unset

icd.unset($className)

Unset all classnames in .icd class

Variability: fw, bc, circle or any classname

UnsetID

icd.unsetid()

Removes all #icd-icon ids from all tags that have the .icd class

Update

icd.update()

Updates the css file of the font, the effect lasts until the page is reloaded