Generate <style> wrapped CSS for direct HTML insertion.
<style>
Composition function: css() → <style>${result}</style>. Perfect for SSR, dynamic stylesheets, component-based styling.
<style>${result}</style>
style`.theme { color: ${isDark ? '#fff' : '#000'}; }`;// Returns: "<style>.theme{ color:#fff; }</style>" Copy
style`.theme { color: ${isDark ? '#fff' : '#000'}; }`;// Returns: "<style>.theme{ color:#fff; }</style>"
Template literal static parts
Rest
Dynamic values (primitives, arrays, objects)
CSS wrapped in style tags
Generate
<style>
wrapped CSS for direct HTML insertion.Composition function: css() →
<style>${result}</style>
. Perfect for SSR, dynamic stylesheets, component-based styling.Example