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…
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-roleattribute.
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.
Text content
123
<chat-bubble><p>Paragraph content with <strong>formatting</strong>.</p></chat-bubble>
Code Blocks
Wrap code in <pre><code> for monospace styling with a subtle background.
Code block in bubble
1234
<chat-bubble><p>Here's an example:</p><pre><code>console.log('code blocks work')</code></pre></chat-bubble>
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.
Typing indicator
123
<chat-messagedata-role="agent"data-status="typing"><chat-bubble><spanclass="visually-hidden"data-chat-typing>Assistant is typing</span></chat-bubble></chat-message>
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)