How the site’s look is inherited
- Detection (per package and version).
Builder_OS_Layout_Kitreads the package’s CSS variables (the same as Global design’s, with its changes) and assigns each one to a role by its name:Role Variables it recognizes (in order of preference) accent --accent,--primary,--brand,--color-accent,--color-primary… (withouthover,soft,light…)text --color-text,--text,--ink,--fg,--body-colorheadings --color-heading,--title,--text-dark,--inkbackground / surface / dark --bgand--background;--surface,--bg-cardand--sand;--bg-dark,--darkand--inkborder --border,--line,--dividerfonts --font-heading,--font-displayand--font-title;--font-body,--font-baseand--font-sanssizes --radiusand--radius-btn;--containerand--max-width;--container-padand--gutter;--space-sectionand--section-*;--gap;--fs-h1…With that it generates a bridge that’s printed only on builder pages and in the editor:
:root{ --bos-accent: var(--color-primary); --bos-font-heading: var(--font-heading); ... }.- It points to the package’s variables (it doesn’t copy their values), so a change in Global design shows up instantly.
- It also calculates the readable text over the accent and over the dark background (white or near black, whichever has more contrast: AA).
- Neutral values. Whatever the package doesn’t define has a neutral fallback in
builder-os-layout.css:var(--bos-accent, #111827),var(--bos-container, 1200px),var(--bos-radius, 8px)… A package with no variables also looks good, though restrained. - Zero specificity for typography. Default font, heading size and colors go with
:where(). That’s why any package rule (h2 {…},a {…}) wins and a new heading is identical to the package’s. Structure (margins, flex, widget sizes) does use classes, so the widget is consistent. - Package buttons.
- Its CSS is searched for button classes that work on their own (a single-compound selector:
.btn,.btn--primary,a.btn-outline:hover) and they’re sorted by their use in the templates. - If there’s a base class and modifiers, each combination is a style of the Button widget: Primary, Outline, Dark… They’re also used in the Call to action, the Pricing table, the Search and the templates.
- If there are none (for example,
.hero .btnonly inside the hero), BuilderOS’s buttons are used:.bos-btn--primary,--outline,--darkand--link. They follow the package’s accent and radius and Global design’s “Added buttons.” Their stylesheet is printed before Global design so that it wins.
- Its CSS is searched for button classes that work on their own (a single-compound selector:
- Each page’s package. It’s its sections’; if none, the canvas header’s; otherwise, the first one installed. On a page that only has new sections, BuilderOS still loads that package’s CSS (its variables, fonts and buttons).
- Templates. They only use bridge variables (
var(--bos-surface),var(--bos-dark),var(--bos-on-dark)…) and the kit’s button styles. That’s why the same template looks different, and distinctly its own, on each site.
Package color palette
Besides the bridge roles (accent, dark, surface…), the kit detects all the package’s colors (its color variables, excluding state ones —hover, focus— and translucent ones; up to 16). The editor offers them as a palette in widgets that previously only used the accent:
- Swatches: first the roles (Accent, Secondary, Dark, Text, Surface, Page background) and then the rest of the package’s colors with their name (e.g. “Green”).
- “Default” (goes back to the site’s accent) and free color (color picker).
var(--color-x)(follows Global design) or the chosen color is saved in the widget root’s--bos-tonevariable, per device. The readable text on top (--bos-on-tone, white or near black, AA contrast) is calculated automatically: in the editor when you choose it and on the server if it’s missing (MCP, old blocks).- Widgets with color: Icon, Icon box, Icon list, Quote, Pricing table, Social icons, Tabs, Counter, Progress bar, Content carousel and Card with image (“colored” style), Circular indicator, Animated headline, Flip box (back face), Hotspots on image, Filterable portfolio (active filter), Highlighted text, Price list, Timeline, Announcement bar, Linked chips and Link with arrow in a circle.
- A colored box (section or container) uses
--bos-box(and--bos-on-box): “Background › Color” changes it and recalculates the text on top.
Cards: one style for all widgets
The widgets’ cards (Pricing table, Testimonial, Call to action, Posts, Countdown and the rest) use the “Card style” field (Style tab › Options):
| Style | Appearance |
|---|---|
| Card (default) | The site’s card background (--bos-surface, white if undefined) with a thin border (--bos-border) |
| Card with shadow | Surface and soft shadow, no border |
| Soft tint | Text color at 4% |
| Border only | No background, with a border |
| No background | Neither background nor border |
Card radius: --radius × 1.5, with a maximum of 32 px.