o-icons

mixins

oIconsGetIcon

@mixin oIconsGetIcon($icon-name, $color, $container-width, $container-height, $apply-base-styles, $apply-width-height, $iconset-version) { ... }

Description

Get an SVG icon with PNG fallback for ie6-8

Parameters

parameterNameparameterDescriptionparameterTypeparameterDefault value
$icon-name

this should be a reference to an icon included in o-icons eg arrow-down

Stringnone
$color

this should be a hex colour value. Used to color the icon. We suggest using an o-colors an o-colors function.

Stringnone
$container-width

this is the width to set the icon containing element to. Defaults to 20px. This value is also used to request a PNG fallback of the right size from the image service.

Stringnone
$container-height

this is the height to set the icon containing element to. Defaults to null, and will use the value of $container-width

Stringnone
$apply-base-styles

defaults to true. If true, will output style rules for the container. If false will only output the background-image property

Boolnone
$apply-width-height

defaults to true. If true, will output the styles for the container width and height.

Boolnone
$iconset-version

defaults to 1. At present only 1 version of the icon set is available.

Integernone

Throws

  • Icon set version 0 is not supported with this version of o-icons. Please use version 1.

  • Icon set version #{$iconset-version} does not exist. Please use version 1.

Requires

Links

oIconsBaseStyles

@mixin oIconsBaseStyles() { ... }

Description

Base styles for all icons

Parameters

None.

Used by

Links

variables

o-icons-is-silent

$o-icons-is-silent: true !default;

Description

Silent mode

Type

Bool

Links

o-icons-use-local-assets

$o-icons-use-local-assets: false !default;

Description

Whether SVG icon mixin should use the image service or serve local assets

Type

Bool

Used by

Links

o-icons-service-base-url

$o-icons-service-base-url: "https://www.ft.com/__origami/service/image" !default;

Description

Option to change the base of the image service url

Type

String

Used by

Links

o-icons-service-version

$o-icons-service-version: "v2" !default;

Description

Option to change the version of the image service url

Type

String

Used by

Links