Skip to content

pantoken / plugins/pantoken/logos/src / logosPlugin

Function: logosPlugin()

logosPlugin(options?): PantokenPlugin

Beta

Create the logos plugin.

The css hook contributes the --instui-logo-* image tokens (as url(data:…) values), so a stylesheet built with the plugin can reference any logo through var().

Parameters

options?

LogosOptions = {}

LogosOptions.

Returns

PantokenPlugin

A PantokenPlugin with a css hook.

Example

Add the logo image tokens when assembling CSS through toCss

ts
import { toCss } from "@pantoken/css";
import { byTheme } from "@pantoken/tokens";
import { logosPlugin } from "@pantoken/plugin-logos";

const css = toCss(byTheme("rebrand"), { plugins: [logosPlugin()] });
// then in CSS: background-image: var(--instui-logo-instructure-horizontal-full-color);