Plain English Reference

Complete guide to natural language styling in Taildown

Natural language styling is Taildown's superpower. Write {large-bold primary} instead of cryptic CSS classes.


Philosophy

Natural Grammar First

Taildown follows natural English grammar and word order, not CSS conventions. This makes styling intuitive and self-documenting.

Core Principles:


Typography

Sizes

Control text size with natural keywords:

Unstyled reading text scales from 16px to 18px with the viewport. Headings retain their semantic size hierarchy and use compact line spacing. Explicit size and line-height attributes override these defaults.

Inline code uses a readable text/background pair in both themes, including inside tables and tooltips. Customize --inline-code-text and --inline-code-background in your CSS when composing a different palette; fenced code retains its syntax-highlighting theme.

ShorthandResultCSS Equivalent
{xs}Extra small texttext-xs
{small}Small texttext-sm
{base}Base size (default)text-base
{large}Large texttext-lg
{xl}Extra large texttext-xl
{2xl}2X large texttext-2xl
{3xl}3X large texttext-3xl
{huge}Huge texttext-4xl
{massive}Massive texttext-6xl

Examples:

# Huge Heading {huge}
Normal paragraph text {base}
Small footnote {small muted}

Colors

Semantic Colors

success, warning, error, and info use separate text colors for light and dark pages. Customize --success-text (and the corresponding status variables) independently of the background --success and its --success-foreground. Explicit numbered utilities keep their fixed shades.

muted and combinations such as small-muted use the theme's --muted-foreground, keeping supporting text readable in both themes. Use a numbered gray utility when you specifically want a fixed shade.

primary, secondary, and accent text colors follow the active light or dark theme, including their hover shades. Use these semantic names for readable accents on the default page and card surfaces. Explicit numbered utilities such as text-primary-600 keep their fixed shade. Custom CSS can tune --primary-text and --primary-text-hover (and the corresponding secondary/accent variables) independently of button and background colors.

Use semantic color names for consistency:

ColorUsageExample
primaryPrimary brand color Primary
secondarySecondary brand color Secondary
accentAccent highlights Accent
successSuccess states Success
warningWarning states Warning
errorError states Error
infoInformation Info
mutedMuted/subtle text Muted

Examples:

# Primary Heading {primary}
Success message {success}
Error alert {error bold}
Muted footer text {muted small}

Background Colors

Add -bg suffix for background colors. Status pairs use the same theme colors and contrasting foregrounds as status buttons:

ShorthandResult
{primary-bg}Primary background + white text
{success-bg}Success background + contrasting text
{warning-bg}Warning background + dark text
{error-bg}Error background + contrasting text
{muted-bg}Muted background + dark text

Examples:

:::card {primary-bg}
Primary colored card
:::

:::alert {success-bg}
Success message with background
:::

Layout

Flex

Flexible layout with natural syntax:

ShorthandResult
{flex}Flex container
{flex-col}Flex column direction
{flex-row}Flex row direction
{flex-center}Flex with centered items
{flex-wrap}Flex with wrapping

Example:

:::card {flex flex-center}
Centered content
:::

Spacing

Padding

Control internal spacing:

ShorthandSize
{padded-xs}Extra small padding
{padded-sm}Small padding
{padded}Default padding
{padded-lg}Large padding
{padded-xl}Extra large padding

Example:

:::card {padded-lg}
Large padded card
:::

Gap

Control spacing between items:

ShorthandSize
{gap-xs}Extra small gap
{gap-sm}Small gap
{gap}Default gap
{gap-lg}Large gap
{gap-xl}Extra large gap

Example:

:::grid {3 gap-lg}
Grid with large gaps
:::

Effects

Borders & Corners

Rounded corners and borders:

ShorthandResult
{rounded}Default rounded corners
{rounded-sm}Small rounded corners
{rounded-lg}Large rounded corners
{rounded-xl}Extra large rounded
{rounded-full}Fully rounded (circle/pill)

Example:

:::card {rounded-xl}
Extra rounded card
:::

[Pill Button](#){button primary rounded-full}

Animations

Entrance

Scroll-triggered entrance animations:

This card has {fade-in} applied!

Hover Effects

Interactive hover animations:

This card has {slide-up} applied!

Speed

Control animation speed:

This card has {zoom-in} applied!


Combining Shorthands

The Power of Composition

Taildown shorthands combine naturally to create complex styles with readable syntax.

Simple Example

# Heading {large-bold primary center}

Combines:

  • large - Large text size
  • bold - Bold font weight
  • primary - Primary color
  • center - Centered alignment

Complex Example

:::card {light-glass padded-xl rounded-xl hover-lift fade-in}
Card content
:::

Combines:

  • light-glass - Frosted glass effect
  • padded-xl - Extra large padding
  • rounded-xl - Extra large corners
  • hover-lift - Lift on hover
  • fade-in - Entrance animation

Best Practices

Do

# Great Title {huge-bold primary center}

:::card {light-glass padded-lg hover-lift}
Beautiful, readable, and powerful!
:::

Don't

# Bad Title {.text-4xl .font-bold .text-blue-500}

:::card {.bg-white .p-8}
Falls back to raw CSS classes
:::

Color transparency

For neutral surfaces, gray provides a neutral scale and slate a cooler blue-gray scale. Both have shades 50, 100 through 900 in steps of 100, and 950. Use text-slate-900, bg-slate-50, or border-slate-200, with dark variants for an alternate theme. Semantic muted text adapts automatically when you want a readable secondary text color.

Add an integer opacity from 0 to 100 after a color utility: bg-primary/20, text-gray-900/80, or border-primary/30. This changes that color rather than fading the element's children. It also works with configured colors and prefixes such as dark:bg-primary/10 or md:bg-primary/20.

:::card {bg-primary/10 dark:bg-primary/20 border-primary/30 padded}
A translucent surface with fully opaque text.
:::

Styling dark mode

Semantic colors adapt automatically. For a deliberate palette in each theme, prefix a utility with dark:. The rule applies while the document's dark-mode toggle is active, including in exported HTML.

Your text {text-gray-900 dark:text-gray-100 bg-white dark:bg-gray-900 padded}

Hover here {dark:hover:text-primary-600}

Responsive text {md:dark:text-gray-100}

Dark variants compose with hover:, active:, focus:, focus-visible:, disabled:, last:, and the sm:, md:, lg:, xl:, 2xl: breakpoints. Use utility names after the prefix, such as dark:text-gray-100. In the editor, search Dark mode colors in the Insert menu to start with an editable example.

Quick Reference Card

Cheat Sheet

Typography: xs small large xl 2xl 3xl huge massive | thin light normal medium semibold bold extra-bold black

Colors: primary secondary accent success warning error info muted

Layout: flex flex-col flex-row flex-center | grid grid-2 grid-3 grid-4 | center center-x center-y

Spacing: padded-xs padded-sm padded padded-lg padded-xl | gap-xs gap-sm gap gap-lg gap-xl

Effects: rounded rounded-sm rounded-lg rounded-xl rounded-full | shadow shadow-sm shadow-lg elevated floating

Glass: subtle-glass light-glass glass heavy-glass

Animations: fade-in slide-up slide-down zoom-in | hover-lift hover-glow hover-scale | fast smooth slow