@modular/sdk/css
34 exports in 3 groups.
Types12
- AnimationNametypestring & { readonly [__animName]: true; }
- ComplexStyleRuletypeStyleRule | Array<string | StyleRule>
- CSSPropertiestype{ [Property in keyof CSSTypeProperties]: CSSTypeProperties[Property] | CSSVarFunction | Array<CSSVarFunction | CSSTypeProperties[Property]>; }
- CSSVarPathtypeThemeKey | StripDollar<ColorToken> | StripDollar<SemanticToken>
- GlobalStyleRuletypeWithTokensDeep<VEGlobalStyleRule> & ElectronWindowRegionStyle
- RecipeVariantstypeResolve<Parameters<RecipeFn>[0]>
- RuntimeFntype((options?: Resolve<VariantSelection<Variants>>) => string) & { variants: () => (keyof Variants)[]; classNames: RecipeClassNames<Variants>; }
- SemanticTokentype{ [Category in keyof SemanticTokens]: { [Key in keyof SemanticTokens[Category]]: `$${Category & string}.${Key & string}`; }[keyof SemanticTokens[Category]]; }[keyof SemanticTokens]
- StyleRuletypeOmit<TokenizedStyleRule, 'selectors'> & ElectronWindowRegionStyle & { selectors?: Record<string, TokenizedSelectorRule & ElectronWindowRegionStyle>; }
- ThemeTokenPathtype`$${ThemeKey}`
- TokenReftypeColorToken | RadiusToken | ZIndexToken | EasingToken | ShadowToken | EditorToken | SpacingToken | OpacityToken | FontSizeToken | DurationToken | SemanticToken | ThemeTokenPath | FontWeightToken | LineHeightToken | FontFamilyToken | NegativeSpacingToken
- ViewTransitionNametypeAnimationName
Functions21
- assignVarsfunction<VarContract extends Contract>(varContract: VarContract, tokens: MapLeafNodes<VarContract, string>) => Record<CSSVarFunction, string>
- composeStylesfunction(...classNames: Array<ClassNames>) => string
- createGlobalThemefunction<ThemeTokens extends Tokens>(selector: string, tokens: WithOptionalLayer<ThemeTokens>) => Resolve<WithoutLayer<ThemeVars<ThemeTokens>>> | <ThemeContract extends Contract>(selector: string, themeContract: ThemeContract, tokens: WithOptionalLayer<MapLeafNodes<ThemeContract, string>>) => void
- createGlobalThemeContractfunction<ThemeTokens extends Tokens>(tokens: ThemeTokens) => ThemeVars<ThemeTokens> | <ThemeTokens extends NullableTokens>(tokens: ThemeTokens, mapFn: (value: string | null, path: Array<string>) => string) => ThemeVars<ThemeTokens>
- createGlobalVarfunction(name: string) => CSSVarFunction | (name: string, declaration: VarDeclaration) => CSSVarFunction
- createThemefunction<ThemeContract extends Contract>(themeContract: ThemeContract, tokens: WithOptionalLayer<MapLeafNodes<ThemeContract, string>>, debugId?: string) => string | <ThemeTokens extends Tokens>(tokens: WithOptionalLayer<ThemeTokens>, debugId?: string) => [className: string, vars: Resolve<WithoutLayer<ThemeVars<ThemeTokens>>>]
- createThemeContractfunction<ThemeTokens extends NullableTokens>(tokens: ThemeTokens) => ThemeVars<ThemeTokens>
- createVarfunction(debugId?: string) => CSSVarFunction | (declaration: VarDeclaration, debugId?: string) => CSSVarFunction
- createViewTransitionfunction(debugId?: string) => ViewTransitionName
- cssfunction(path: CSSVarPath) => `var(--${string})`
- fallbackVarfunction(...values: [string, ...Array<string>]) => CSSVarFunction
- fontFacefunction(rule: FontFaceRule | FontFaceRule[], debugId?: string) => string
- globalFontFacefunction(fontFamily: string, rule: FontFaceRule | FontFaceRule[]) => void
- globalKeyframesfunction(name: string, rule: CSSKeyframes) => void
- globalLayerfunction(options: LayerOptions, name: string) => string | (name: string) => string
- globalStylefunction<const T extends GlobalStyleRule>(selector: string, rule: T) => void
- keyframesfunction<const T extends Record<string, StyleRule>>(rule: T, debugId?: string) => AnimationName
- layerfunction(options: LayerOptions, debugId?: string) => string | (debugId?: string) => string
- recipefunction<Variants extends VariantGroups>(options: PatternOptions<Variants>, debugId?: string) => RuntimeFn<Variants>
- stylefunction<const T extends ComplexStyleRule>(rule: T, debugId?: string) => string
- styleVariantsfunction<M extends Record<string | number, ComplexStyleRule>>(styleMap: M, debugId?: string) => Record<keyof M, string> | <D extends Record<string | number, unknown>, K extends keyof D>(data: D, mapData: (value: D[K], key: K) => ComplexStyleRule, debugId?: string) => Record<keyof D, string>