compileFormatVariantsToCss
One `@custom-variant` per declared format id, each scoped to the frame shell's `data-format` stamp (the frame root itself, or anything inside it).
One @custom-variant per declared format id, each scoped to the frame
shell’s data-format stamp (the frame root itself, or anything inside it).
Prepend the returned block to the template’s Tailwind entry.
Import from @homepages/template-kit.
Signature
Section titled “Signature”function compileFormatVariantsToCss(formats: readonly FormatVariantSource[]): stringParameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
formats |
readonly FormatVariantSource[] |
required |
Returns
Section titled “Returns”string
Constraints
Section titled “Constraints”- when a format id fails {@link formatVariantNameError} — the manifest
parse enforces the same rule earlier, so a throw here means the caller
compiled formats no
defineTemplateproduced.