Generate <style> wrapped CSS for direct HTML insertion.

Composition function: css() → <style>${result}</style>. Perfect for SSR, dynamic stylesheets, component-based styling.

style`.theme { color: ${isDark ? '#fff' : '#000'}; }`;
// Returns: "<style>.theme{ color:#fff; }</style>"
  • Parameters

    • strings: TemplateStringsArray

      Template literal static parts

    • Rest...values: any[]

      Dynamic values (primitives, arrays, objects)

    Returns string

    CSS wrapped in style tags