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…
Section edges: clip the top or bottom edge of a section into a wave, chevron, scallop or diagonal with CSS shape(). Any start shape combines with any end shape.
Overview
data-shape-start clips the top edge of an element and data-shape-end clips its bottom edge, so stacked page sections flow into each other with a wave, chevron, scallop or diagonal instead of a straight line. Use them on <section>, <article>, <header>, <footer> or <aside> that has a background colour; without a background there is nothing to see.
The shapes are pure CSS (clip-path: shape()), live in the utils layer and sit behind @supports, so browsers without shape() show a plain rectangle.
<sectiondata-shape-end="wave"><h2>Our services</h2><p>The bottom edge is a wave.</p></section><sectiondata-shape-start="chevron"data-shape-end="scallop"><h2>How it works</h2><p>Chevron on top, scallop at the bottom.</p></section>
Every start value combines with every end value on the same element. VB adds padding on each shaped side equal to the shape depth plus a gap, so the content never runs into the clipped area.
Any other value (including none) does nothing: no clip and no extra padding.
The edges are physical: the start edge is the top and the end edge is the bottom. They do not rotate in vertical writing modes. diagonal slopes the other way in right-to-left pages; the other shapes are symmetric.
Styling
Custom property
Default
Effect
--shape-depth
48px
How far the shape cuts into the element. A registered <length>, so it can be responsive (clamp(2rem, 6vw, 5rem)) but not a percentage. The cyber theme sets 40px, kawaii 32px.
--shape-edge-padding
var(--size-l)
The gap between the shape and the content. The padding on a shaped side is --shape-depth + --shape-edge-padding.
The padding on a shaped side is load-bearing and set with !important, so a padding rule on the section cannot shrink it below the depth and let the text be clipped. Change the gap with --shape-edge-padding instead. The unshaped sides keep your padding.
The shapes are decorative. They add no role and no text, so the section still needs its own heading.
Content is never clipped: the depth and the compensating padding are the same length, so on a narrow, tall section the last line stays clear of the edge.
The clip runs past the straight sides and the unshaped edge, so focus rings, outlines and shadows of links near those sides are not cut off. Only the shaped edge itself clips; the padding keeps content (and its focus rings) away from it.
In forced colours mode and in print the clip is removed. Backgrounds are flattened there, so the shape would only cut into the content.
Examples
Bottom-only, top-only, mixed start and end, stacked sections and custom depths.