SDK JS
    Preparing search index...
    • Every widget stylesheet as one string, for pages that will not accept an injected <style>.

      Returns string

      Concatenated CSS for every Bitruvius widget.

      The normal path needs none of this — add a widget and it styles itself. This exists for the two cases where that is not allowed: a Content-Security-Policy that forbids inline styles with no nonce available (see setWidgetStyleNonce), and a build that wants the CSS in its own bundle. Write the result to a file at build time, or serve it from your own origin, and the injected copies become harmless duplicates of rules already in force.

      Returns the CSS for all widgets rather than one per widget, because which widget lands on a given page is a runtime decision and a per-widget API would just be six imports to keep in sync.

      // build step
      await Bun.write('public/bitruvius-widgets.css', bitruviusWidgetCss());