stoop
Version:
CSS-in-JS library with type inference, theme creation, and variants support.
19 lines (18 loc) • 930 B
TypeScript
/**
* Global CSS injection API.
* Creates a function that injects global styles into the document.
* Supports media queries, nested selectors, and theme tokens.
*/
import type { CSS, Theme, ThemeScale, UtilityFunction } from "../types";
/**
* Creates a global CSS injection function.
* Injects styles directly into the document with deduplication support.
*
* @param defaultTheme - Default theme for token resolution
* @param prefix - Optional prefix for CSS rules
* @param media - Optional media query breakpoints
* @param utils - Optional utility functions
* @param themeMap - Optional theme scale mappings
* @returns Function that accepts CSS objects and returns a cleanup function
*/
export declare function createGlobalCSSFunction(defaultTheme: Theme, prefix?: string, media?: Record<string, string>, utils?: Record<string, UtilityFunction>, themeMap?: Record<string, ThemeScale>): (styles: CSS) => () => void;