Skip to content

pantoken / renderers/bootstrap/src / toBootstrapCss

Funksjon: toBootstrapCss()

toBootstrapCss(options?): string

Eksperimentell

Generer Bootstrap → Instructure CSS‑variabel‑bro.

Parametrar

options?

ToBootstrapCssOptions = {}

ToBootstrapCssOptions.

Returnerer

string

CSS‑strengen som dannar broen.

Døme

Standard :root‑bro

ts
import { toBootstrapCss } from "@pantoken/bootstrap";

const css = toBootstrapCss();
// ":root { --bs-primary: var(--instui-color-background-brand); … }"

Avgrens til Bootstrap sitt theme‑attributt

ts
import { toBootstrapCss } from "@pantoken/bootstrap";

const css = toBootstrapCss({ selector: "[data-bs-theme]" });