冲鸭博客 · Brand Copy CSS

daisyUI v5 · theme = baklib

Baklib Brand Guidelines

The single source of truth for this theme's visual system (cms/blog): colors, radius, sizing, and components all derive from this page. When updating any token, keep this page in sync with src/stylesheets/application.css.

name

baklib

scheme

light

default

false

prefersdark

false

Design Tokens

Six categories form a complete daisyUI theme. Colors suffixed with -content guarantee text contrast on their corresponding background.

Color

8 pairs

Radius

3 levels

Size

2 levels

Border

2px

Depth

1

Noise

0

Color Palette

All colors are exposed as CSS variables. Use them directly via Tailwind classes such as bg-primary or text-primary-content.

Base / Surface

base-100 #f7f5f3
base-200 oklch(95% 0.0081 61.42)
base-300 oklch(90% 0.0081 61.42)
base-content oklch(40% 0.0081 61.42)

Brand · Semantic

Primary / content

primary

#0f766e

primary-content

#f7f5f3
Secondary / content

secondary

#c2410c

secondary-content

oklch(73.92% 0.2135 50.94)
Accent / content

accent

#0f172a

accent-content

oklch(98% 0.003 247.858)
Neutral / content

neutral

oklch(21% 0.034 264.665)

neutral-content

#f7f5f3
Info / content

info

oklch(80.39% 0.1148 241.68)

info-content

oklch(30.39% 0.1148 241.68)
Success / content

success

#14b8a6

success-content

oklch(23.92% 0.0901 136.87)
Warning / content

warning

#fdba74

warning-content

oklch(43.92% 0.1085 80)
Error / content

error

oklch(63% 0.237 25.331)

error-content

oklch(35.1% 0.1814 22.37)

Border Radius

Three radius tokens, picked by semantic role: selector (extra round) → field (gentle) → box (strong).

--radius-selector

2rem

Used for: Badge / Toggle / Checkbox

--radius-field

0.5rem

Used for: Button / Input / Tab

--radius-box

1rem

Used for: Card / Modal / Alert

Sizing

Base unit for sizing; daisyUI derives the xs / sm / md / lg / xl scale from it.

--size-field

0.25rem

--size-selector

0.25rem

Effects

Border width / depth / noise — three knobs that shape the overall tactile feel of the brand.

--border

2px · thicker, reinforces geometric edges

--depth

1 · enables 3D shadows and highlights

--noise

0 · noise disabled, surfaces stay clean

Typography

Fonts follow the system default sans-serif stack. Headings use tracking-tight + text-accent; body text uses text-base-content.

Display · text-5xl / semibold

Let content flow

H1 · text-3xl / semibold

Heading One

H2 · text-xl / semibold

Heading Two

Body · text-base

Baklib is a lightweight CMS & knowledge-base platform for teams, built on daisyUI v5.

Caption · text-sm / muted

Used for explanatory copy, form hints, and timestamps.

Code · font-mono

npm run build · yarn dev

Components

Prefer daisyUI components first (btn / input / card / alert / badge); only customize when truly necessary.

Buttons

Form Controls

Badges

Primary Secondary Accent Info Success Warning Error Outline

Loading

Alerts

Card title

Built on daisyUI's card container; its corner radius automatically follows --radius-box. Cards are the preferred container for composing complex information.

Visits
31K
↑ 12% vs last week
Articles
128
+14 this month

Integration

Baklib CMS themes support real-time color customization from the admin panel, so colors and static tokens take different entry points. Do not put @plugin "daisyui/theme" directly into application.css — that bypasses the platform's runtime customization mechanism.

Back to top ↑

Runtime customization flow

  1. 1

    Admin panel

    User picks a recommended palette or custom HEX colors

  2. 2

    Platform inject

    Each color is split into HSL components and written to :root --theme-color-*

  3. 3

    Layout mapping

    layout/theme.liquid maps --theme-color-* onto daisyUI's --color-*

  4. 4

    Instant apply

    All daisyUI components refresh immediately — no CSS rebuild needed

A · Static tokens

src/stylesheets/application.css

Radius / size / border / depth / noise — these are fixed brand properties, not exposed to admin customization.

/* src/stylesheets/application.css */
@plugin "daisyui" {
  themes: false;
  exclude: scrollbar, rootcolor;
  logs: false;
}

:root {
  --radius-selector: 2rem;
  --radius-field: 0.5rem;
  --radius-box: 1rem;
  --size-selector: 0.25rem;
  --size-field: 0.25rem;
  --border: 2px;
  --depth: 1;
  --noise: 0;
}

B · Runtime color mapping

layout/theme.liquid & layout/error.liquid

Inject a <style> in <head> to map platform-provided --theme-color-* onto daisyUI's --color-*, enabling real-time customization.


C · Recommended palette (admin-selectable)

config/settings_schema.json

Register the "baklib brand" preset under theme_info.recommendations.color_schemas, paired with the locale key schema.recommendations.baklib.name.

/* config/settings_schema.json · theme_info.recommendations.color_schemas */
"baklib": {
  "name": "t:schema.recommendations.baklib.name",
  "colors": {
    "--theme-color-primary":   "#0F766E",
    "--theme-color-secondary": "#C2410C",
    "--theme-color-accent":    "#0F172A",
    "--theme-color-info":      "#60A5FA",
    "--theme-color-success":   "#14B8A6",
    "--theme-color-warning":   "#FDBA74"
  }
}
D · Full brand defaults (developer reference only)

Below are the expected default values for every brand token. This page inlines them under [data-theme="baklib"] to demonstrate the brand effect; in production the actual colors come from the combination of A + B + C above.

/* Baklib brand defaults · developer reference only */
{
  name: "baklib";
  color-scheme: "light";

  --color-base-100: #f7f5f3;
  --color-base-200: oklch(95% 0.0081 61.42);
  --color-base-300: oklch(90% 0.0081 61.42);
  --color-base-content: oklch(40% 0.0081 61.42);

  --color-primary: #0f766e;
  --color-primary-content: #f7f5f3;
  --color-secondary: #c2410c;
  --color-secondary-content: oklch(73.92% 0.2135 50.94);
  --color-accent: #0f172a;
  --color-accent-content: oklch(98% 0.003 247.858);
  --color-neutral: oklch(21% 0.034 264.665);
  --color-neutral-content: #f7f5f3;

  --color-info: oklch(80.39% 0.1148 241.68);
  --color-info-content: oklch(30.39% 0.1148 241.68);
  --color-success: #14b8a6;
  --color-success-content: oklch(23.92% 0.0901 136.87);
  --color-warning: #fdba74;
  --color-warning-content: oklch(43.92% 0.1085 80);
  --color-error: oklch(63% 0.237 25.331);
  --color-error-content: oklch(35.1% 0.1814 22.37);

  --radius-selector: 2rem;
  --radius-field: 0.5rem;
  --radius-box: 1rem;
  --size-selector: 0.25rem;
  --size-field: 0.25rem;
  --border: 2px;
  --depth: 1;
  --noise: 0;
}