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…
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:
The wrapper's ::before paints the border colour across the whole shape.
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
Hexagon frame around an avatar
<spandata-border-shape="hexagon"><imgsrc="avatar.jpg"alt="Ana Ruiz, head of design"width="200"height="200"></span>
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
Value
Frame
hexagon
Six-sided frame
diamond
Rotated-square frame
arch
Rounded-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 property
Default
Effect
--shape-border
4px
Border thickness: the margin between the wrapper and its child.
--shape-border-color
var(--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.
Linked arch frame
<spandata-border-shape="arch"><ahref="/team/ana/"><imgsrc="ana.jpg"alt="Ana Ruiz, head of design"width="200"height="200"></a></span>