UNPKG

@nvl/lightningcss-plugin-egal

Version:

Lightning CSS plugin to simplify uniformity in color saturation.

25 lines (24 loc) 921 B
/** * @packageDocumentation * The `@nvl/lightningcss-plugin-egal` module has just one non-type export (a * default export, in fact), which is a Lightning CSS visitor (i.e., plugin) * that replaces `egal` colors with their equivalent CSS color. * * @module egalVisitor */ import type { CustomAtRules, Visitor } from 'lightningcss'; import { type EgalOptions, type OutputFormat } from '@nvl/egal'; /** * Options for the egal visitor (i.e., plugin). */ export type VisitorOptions = EgalOptions<OutputFormat>; /** * A visitor (i.e., plugin) for Lightning CSS that transforms calls to the * `egal` CSS function into the output of the corresponding `egal` function * call. * * @param options - Default options for the egal function. * @returns A visitor that transforms `egal` function calls in CSS. */ declare function egalVisitor(options?: VisitorOptions): Visitor<CustomAtRules>; export default egalVisitor;