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…
<blink-wc> makes its content blink, as a replacement for the retired <blink> tag that can be paused and stops for reduced motion. Its modes (named looks such as a neon sign or a terminal cursor) take their colors, fonts and corner radius from Vanilla Breeze tokens.
Six modes on a Vanilla Breeze page. None of them sets a color or a font: both come from the theme tokens.
Usage
With no attributes, the content switches fully on and off once a second. behavior="pulse" fades instead, and count stops it after a set number of blinks.
Plain blink and a soft pulse
<blink-wc>Recording</blink-wc><blink-wcbehavior="pulse"rate="2s"count="5">3 new replies</blink-wc>
A mode styles the element as well as animating it.
Surface themes
<blink-wcmode="warning">Unsaved changes</blink-wc><blink-wcmode="terminal">npm run build</blink-wc>
The letter modes animate each letter in turn. Add unit="word" to animate whole words.
Letter and word motion
<blink-wcmode="wave">Now boarding</blink-wc><blink-wcmode="cascade"unit="word">One word at a time</blink-wc>
Style the whole element: a glowing sign, a green screen, a block cursor after steady text, an amber or red panel, a red and blue light bar, a gold sign.
Split the text into letters, or words with unit="word", and animate each one with a small delay.
Script-driven
morse, decode
morse blinks the text out in Morse code with a dot and dash caption. decode runs through random characters, then settles on the real text.
Step modes
extrude, collapse, outline, morph, depth, revolve
Use the step engine, so each step of the cycle has its own look.
The step engine
A step is one stage of the blink cycle. With behavior="steps", or any step mode, the element moves through its steps during one rate cycle and sets data-step="0", data-step="1" and so on in turn. You style each step with CSS. A plain blink is the two-step case.
The component's stylesheet names Vanilla Breeze tokens directly, so a themed page needs no setup. Tokens resolve on each element, so light and dark mode both work.
Token
Drives
--color-accent
Text of neon, extrude, outline and depth; the cursor of terminal and typewriter; the lit letter in chase.
--color-primary
The shadow block of extrude, and the fallback when no accent is set.
--color-success
The glow color of crt; text of morse and decode.
--color-warning
Panel of warning.
--color-error
Panel of alert.
--color-text
Text of terminal.
--color-surface-sunken, --color-surface
Background of terminal.
--font-mono, --font-sans
Typeface of each mode: mono for crt, terminal, morse and decode; sans for the other surface themes and extrude.
--radius-m
Corner radius of the panels.
For each value the styles use the first of these that is set: the --blink-* property, then the Vanilla Breeze token, then a built-in default. Text on the warning and alert panels is worked out as black or white from the panel color, so it stays readable with any theme and with your own --blink-bg.
All the styles sit in the cascade layer web-components, which is one of Vanilla Breeze's own layers. Theme packs can therefore restyle the component, and your unlayered CSS overrides it without !important.
blink-wc or data-effect="blink"
Vanilla Breeze has a CSS-only blink, data-effect="blink", which stops by itself after about five seconds. Use it to draw the eye to one thing once, with no script. Use blink-wc when you need a themed look, letter-by-letter motion, the step engine, script control or events.
Accessibility
Blinking content is a real hazard for some readers, which is why browsers dropped <blink>. Keep blinking areas small and slow: below about three flashes a second, and never across the whole screen.
Reduced motion. All animation stops and the text shows in full when the operating system asks for reduced motion, and also when Vanilla Breeze's own setting puts data-motion-reduced on <html>. The change applies at once, with no reload. It keeps blinking only if you set reduced-motion="ignore".
Screen readers. The text is read once, as written. The letter and word modes hide their animated pieces from assistive technology and expose a visually hidden copy of the text instead. Content that holds links or other controls is left as you wrote it. The terminal cursor, the typewriter caret and the Morse caption are not announced.
Keyboard. With pause-on-hover, the blinking also pauses while focus is on a link or control inside the element.
Idle cost. The blinking pauses while the element is off screen and while the tab is hidden.