Aberdeen - v1.8.0
    Preparing search index...

    Variable cssVarsConst

    cssVars: Record<string, string> = ...

    A reactive object containing CSS variable definitions.

    Any property you assign to cssVars becomes available as a CSS custom property throughout your application.

    Use setSpacingCssVars to optionally initialize cssVars[1] through cssVars[12] with an exponential spacing scale.

    When you reference a CSS variable in Aberdeen using the $ prefix (e.g., $primary), it automatically resolves to var(--primary). For numeric keys (which can't be used directly as CSS custom property names), Aberdeen prefixes them with m (e.g., $3 becomes var(--m3)).

    When you add the first property to cssVars, Aberdeen automatically creates a reactive <style> tag in <head> containing the :root CSS custom property declarations. The style tag is automatically removed if cssVars becomes empty.

    import { cssVars, setSpacingCssVars, $ } from 'aberdeen';

    // Optionally initialize spacing scale
    setSpacingCssVars(); // Uses defaults: base=1, unit='rem'

    // Define custom colors - style tag is automatically created
    cssVars.primary = '#3b82f6';
    cssVars.danger = '#ef4444';

    // Use in elements with the $ prefix
    $('button bg:$primary fg:white');

    // Use spacing (if setSpacingCssVars() was called)
    $('div mt:$3'); // Sets margin-top to var(--m3)