These rules assume a Tailwind + DaisyUI site (
Styling: tailwind-daisy, the default).select_siteandlist_site_filesprint the site'sStyling:line.tailwind: DaisyUI is off, sobtn,card,badge,hero,navbar… render as nothing; build them from utilities and palette tokens.own-css(an imported site): reuse the classes itstheme.cssand<style>s define; Tailwind compiles only classes that CSS doesn't define, and palette tokens and DaisyUI aren't its design system.
- Call it first on a new site, before adding blocks. It writes
theme.cssin the draft immediately. To compare palettes usesuggest_palettes, and to pick fontssuggest_font_pairings: they show choices for the user to apply. presetloads palette, fonts and styleGuide; explicit params override. By fit: bakery/restaurant → restaurant-warm / warm-editorial / rustic; SaaS → modern-minimal / notion; luxury → luxury-dark.- A partial call (only
fonts, onlypalette) changes only that: set_theme sets custom properties one by one and leaves every other line oftheme.cssalone. Hand-written rules there are never touched. - Then set the company fields in
site.json(name, tagline, phone, email, address, location, website, type) with edit_site_file. Without them{{ company.name }}shows "Acme Inc.".
Palette
palette: pass the complete list — it replaces the palette. [{ name, color }], colors in hex / rgb / hsl / oklch(). Use DaisyUI 5 names: Primary, Primary Content, Secondary, Secondary Content, Accent, Accent Content, Neutral, Neutral Content, Base 100, Base 200, Base 300, Base Content, Error, Error Content, Info, Info Content, Success, Success Content, Warning, Warning Content, Ring. Not "Background" / "Foreground" / "Primary Text" — those don't bind to bg-base-100 / text-base-content.
darkPalette: same names, dark colors; enables dark mode.
Outline CTA pitfall: on minimal black-and-white themes keep Primary and Base Content at clearly different lightness, or btn-outline + text-base-content reads dark-on-dark.
Style guide
styleGuide is merged into the existing one, and every key becomes a CSS variable.
- Fonts:
headingFontFamily,bodyFontFamily, optionalaccentFontFamily(Google Font names). Any*FontFamilykey creates a var (displayFontFamily→--display-font-family). Usefont-heading/font-body/font-accent— neverfont-['Name'], never a font<link>in a page. headingFont/bodyFont: weight class, e.g. "font-bold".- Radius:
radiusBox(0.5rem; buttons, cards),radiusField(inputs),radiusSelector(checkboxes). - Size:
sizeField,sizeSelector(0.25rem). depth0 | 1,noise0 | 1,border("1px").buttonPadding("0.75rem 1.5rem", Y X),containerPadding("2rem 2rem"),contentWidth("80rem", backsmax-w-page).shadowStyle("0 1px 3px rgba(0,0,0,0.1)").spacingDensity(1.25) writes--spacing-densityin:root, the multiplier every*-space-*token reads.breakpoints(px) write--ph-bp-sm|md|lg|xl|2xlin:root, the widthssm:/md:use; Tailwind's--breakpoint-*does nothing on a published site.- Inputs:
inputBorderColor,inputBgColor,inputTextColor,inputPlaceholderColor,inputFocusRingColor. Links:linkColor,linkHoverColor.
fonts ({ url } or { families }) is only a hint parsed into heading/body families when styleGuide omits them. daisyui: false turns the DaisyUI component classes (btn, card…) off for the site.
Not set_theme: site animations (CSS in theme.css, see animation) and JSON-LD (a <script type="application/ld+json"> in the page file, or site.json inject for every page).