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

Prototyping

Build a page from the markup you will keep, with placeholder images and text, a wireframe rendering for early review and skeleton states for content that loads late.

How it works

A prototype is the real page with stand-in content. You write the elements the finished page will have and mark the ones whose content is not ready. Each tool is an attribute on a native element, so replacing a placeholder means changing content, not structure.

Attribute Goes on Does Needs
data-mock <img>, <video>, <iframe>, <canvas> Shows a labelled placeholder box at the right size The full bundle, or the prototype pack with the core bundle
data-lorem Any element that holds text Fills the element with filler text The same as data-mock
data-wireframe <html> or any container Draws everything inside as a sketch The development add-on
data-loading="skeleton" A container Shows its children as grey blocks Any Vanilla Breeze stylesheet

What to load gives the file names.

Placeholder media

Add data-mock to an image with no src. The stylesheet draws a grey box with a cross through it, and the script gives the image a generated src so the element is valid. The label in the box is the image's alt text, or its dimensions when there is none.

Presets

A preset name as the value sets the shape and a default width, so width and height are not needed.

Value Aspect ratio Width
hero3:1100%
card16:9400px
product1:1400px
thumbnail1:1150px
logo4:1200px
og1200:630100%
banner728:90100%

Photographs and portraits

Some values load a real picture from another host. Use them when a grey box would hide a design problem, such as text over a photograph. They need a network connection, and each sends a request to a third party.

Value Shows Loaded from
photo A photograph at the image's width and height picsum.photos
placehold A flat box with the alt text in it placehold.co
avatar A face, 48 pixels wide and round cdn.jsdelivr.net (the Faker portrait set)
portrait, profile A face, 128 pixels square
headshot A face, 256 pixels square

Add data-seed to get the same picture on every load. Without it, a portrait is chosen from the alt text, so the same name always gets the same face.

Video, frames and canvas

A <video> gets a placeholder poster, an <iframe> gets a blank document with its title in the middle, and a <canvas> has the box drawn on it. The label comes from title, or aria-label on a canvas. Without a size, video and frames are 16:9 and a canvas is 4:3, at the full width of the container.

Placeholder text

Add data-lorem to an element and the script fills it. The value says how much text. Anything already inside the element is replaced, and the element is marked translate="no" so translation tools leave it alone.

Value Result
None50 words
A number, such as 20That many words
3 sentencesThat many sentences
headingFive words
5 itemsThat many <li> elements, one sentence each, in a <ul> or <ol>
cjk (Japanese), chinese, korean, arabic, hebrew, cyrillic, latinA paragraph in that script

Other scripts

The text follows the nearest lang attribute. Japanese and Chinese each get filler in their own language, counted in characters because neither puts spaces between words. The Chinese filler is in Simplified characters. Korean gets Korean filler, counted in words. Arabic, Persian and Urdu get Arabic filler, and Hebrew gets Hebrew filler. Russian, Ukrainian, Bulgarian and Serbian get Russian filler. Every other language gets Latin. Use it to check line length, line height and direction before translated content exists.

Wireframe mode

data-wireframe redraws the page as a sketch: grey fills, outlined boxes, no shadows, and images replaced by crossed boxes. The markup does not change, so a review of the wireframe is a review of the real structure. It needs the development add-on.

Levels

Value Text Boxes Use it to review
lo Scribbles (the Redacted Script font) Solid lines, black and white only Placement and proportion, with nothing to read
mid Solid blocks (the Flow Block font) Dashed, grey Hierarchy and the amount of content
hi Your fonts, readable Thin dashed lines, with images faded Wording and flow, before color and imagery
annotate Your fonts Dashed, each with its tag name The elements used
No value Your fonts Dashed, grey The same as mid without the block font

On <html> the page also turns grey and a badge in the corner names the mode. On a container only that region changes. The overview demo switches one region between the levels.

Switching from script

The add-on's script puts a wireframe object on window.VanillaBreeze and binds Ctrl or Cmd + Shift + W to turn the mode on and off for the page.

Labels and review notes

Three more attributes carry what a reviewer needs to know. They come with the development add-on.

Attribute Shows
data-wf-label="Hero" A name badge in the corner of that element, inside a wireframe
data-wf-annotate on <html> or a container Tag-name labels on sections and layouts, at any level
data-wf-callout="Needs a second image" A numbered marker on the element and the note in a list at the end of the page, once you call wireframe.toggleCallouts()

The data-wireframe reference covers the label and callout methods, the data-wf-palette colors and the tokens the mode reads.

Skeleton states

A skeleton is for the running page, not the design review: it holds the shape of content that has not arrived. Put data-loading="skeleton" on a container and each child becomes a grey block of its own size with a moving highlight. The highlight stops when the reader asks for reduced motion. Remove the attribute when the content is ready.

The blocks take their size from the children, so give the container content of about the right length. aria-busy is yours to set and remove. data-loading lists the other loading styles.

Placeholder URLs in script

When script builds the page, there is no element to put data-mock on yet. The development add-on's script adds VanillaBreeze.mock, which returns the same picture URLs as strings.

From prototype to release

  1. Give each image its src and remove data-mock. Keep width, height and alt, and check that the alt text describes the real picture.
  2. Write the real text into each element and remove data-lorem. If the attribute stays, the script replaces your text.
  3. Remove data-wireframe and the data-wf-* attributes, and take the development add-on's stylesheet and script out of the page.

A search of the project for data-mock and data-lorem finds anything left behind.

A whole page

This page uses placeholder media and text throughout. The control at the top turns wireframe mode on and sets the level.

↑