style embeds

Style Embeds

Tailwind + DaisyUI, hosted. One meta tag. No build step.

Any HTML file you share through MunchFile can opt into a hosted Tailwind CSS v4 + DaisyUI v5 bundle. Add one tag to your <head> and you can write <div class="card">instead of inline styles. The bundle is version-pinned and served by MunchFile — no CDN links in your file, and your file stays small.

Opt in

Add this line to your document's <head>:

<meta name="munchfile-embed" content="tailwind-daisyui@1">

Then set a theme on your <html> element. Without it you get DaisyUI's default palette.

<html lang="en" data-theme="light">

Available bundles

Today there is one bundle. The format is <name>@<version>. Versions are append-only — a published bundle never changes.

  • tailwind-daisyui@1 — Tailwind CSS v4 (browser/JIT) + DaisyUI v5.

How it works

When MunchFile serves your HTML, it detects the meta tag and injects the bundle assets into the document's <head> before the browser parses the body. Your own <style> blocks still apply on top.

Token savings — measured

Measured with js-tiktoken (cl100k_base) on three representative pages. Each row shows the same rendered page written two ways: once with inline styling ("vanilla") and once with the Style Embeds opt-in ("embedded").

Page typeVanillaEmbeddedRatio
Blog post5.2 KB · ~1,698 tok2.8 KB · ~751 tok2.26×
Dashboard3.1 KB · ~1,067 tok1.5 KB · ~429 tok2.49×
Landing page2.2 KB · ~769 tok1.1 KB · ~333 tok2.31×

Fixtures live in benchmarks/style-embeds/ in the MunchFile repo. The comparison is what matters; tokenizer choice only affects absolute counts, not the ratio.

FAQ

Why a meta tag and not a CLI flag?

Because the file declares its own intent. No database column, no CLI option to remember, no upload-time decision — the same file behaves the same way wherever it ends up.

Is this on by default?

No. Style Embeds is strictly opt-in. Without the meta tag, MunchFile serves your HTML untouched.

Can I still ship my own <style> / <script>?

Yes. The bundle is additive — your own styles and scripts still apply, and your styles win over the bundle defaults.

What if I pin an unknown bundle or version?

The opt-in is ignored and the file serves as if there were no meta tag. Bundles are append-only, so an old pinned version will never go missing.

Style Embeds — MunchFile Docs