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

data-border-shape

A coloured hexagon, diamond or arch frame around an image: a clipped background layer plus the image clipped to the same shape, inset by --shape-border.

Overview

data-border-shape goes on a wrapper around an image (or any single block) and draws a coloured frame in a hexagon, diamond or arch shape. CSS borders always follow the box, so the frame is built in two layers:

  1. The wrapper's ::before paints the border colour across the whole shape.
  2. Each direct child sits --shape-border inside the wrapper and is clipped to the same shape in its own box.

The band of ::before left between the two shapes is the border. The wrapper itself is never clipped, so its focus ring and shadow survive.

Usage

The wrapper becomes inline-block (and an isolation root, so the colour layer stays behind the image), and its direct children become display: block so the inset margin applies on all four sides.

Options

ValueFrame
hexagonSix-sided frame
diamondRotated-square frame
archRounded-top arch frame

All three are symmetric, so they look the same in right-to-left pages. The border is measured along the box axes, so on the slanted edges it is a little thinner than on the vertical ones.

Styling

Custom propertyDefaultEffect
--shape-border4pxBorder thickness: the margin between the wrapper and its child.
--shape-border-colorvar(--color-primary)Border colour. Any background value works, including a gradient.

It cannot be combined with data-border-effect: both draw on ::before. data-morph is skipped on the wrapper.

Accessibility

  • The frame is decorative; the image inside still needs alt text.
  • If the wrapper or its direct child is focusable (a link around the image), the frame turns to the focus-ring colour (--color-focus-ring) while it has keyboard focus, so the focus indicator follows the shape. A focusable wrapper also keeps its normal outline, because the wrapper is not clipped.
  • In forced colours mode backgrounds are repainted as Canvas, which would erase the frame, so it is drawn in CanvasText (and Highlight when focused).
  • In print the frame keeps its colour (print-color-adjust: exact), because browsers drop backgrounds by default.

Examples

The three frames on photos; the arch wraps a link, so tab to it to see the focus colour.

↑