Vanilla Breeze v0.7.4

Vanilla Breeze v0.7.4 released

0.7.4 gives the Ambient pack weather. A page names one feed URL on its own site, and the pack sets data-weather from it, uses its sunrise and sunset for dawn and dusk, and never shows a stale observation. Helpers for producing the feed from Open-Meteo are included. Ambient p…

Read the release notes

chat-bubble

Content wrapper for chat messages with typography, code block styling, and CSS-only typing dots animation.

Overview

A presentational wrapper for message content inside <chat-message>. Handles padding, border-radius, typography, and code block formatting. The bubble's background color is controlled by the parent message's data-role attribute.

Content Formatting

Place any HTML content inside the bubble. Paragraphs, inline formatting, and code blocks are all styled. Long unbroken strings (URLs, tokens) wrap with overflow-wrap: anywhere instead of overflowing the bubble.

Code Blocks

Wrap code in <pre><code> for monospace styling with a subtle background.

Typing Dots

When the parent <chat-message> has data-status="typing" and the bubble has no content yet, CSS draws three animated bouncing dots via ::after with radial gradients. "No content" means the bubble is :empty or its only child is a visually hidden [data-chat-typing] label, the text screen readers announce.

When real content arrives, replace the bubble's contents and remove data-status from the parent. The dots stop as soon as the bubble has content, so a streaming transport never shows dots next to text. The same DOM node transitions from typing indicator to content — no element swap.

Reduced Motion

When prefers-reduced-motion: reduce is active, the typing animation is disabled and the dots display as a static indicator at reduced opacity.

CSS Variables

Variable Default Description
--chat-bubble-radius var(--radius-m) Bubble border radius (inherited from chat-message)

Related

  • <chat-message> — Parent message element
  • <chat-thread> — Scrollable message container
  • data-bubble — CSS-only bubble shapes with tails, for static transcripts that do not need the chat components
↑