Fluid width with a maximum
A fluid container needs a small-screen width and a large-screen maximum. Outer gutters should remain visible at both extremes.
Developer journal
Layout, typography and interaction details you can inspect in the browser.
A fluid container needs a small-screen width and a large-screen maximum. Outer gutters should remain visible at both extremes.
A square ratio reserves equal sides even before media loads. Fit rules decide whether rectangular content is cropped or letterboxed.
Roman numerals change the visual marker style while preserving document order. Longer markers need enough inline space.
A logical minimum inline size protects a component from collapsing beyond its usable width. An overly large minimum can force overflow.
Minimum block size reserves space along the writing mode's block axis. Content can still make the element grow.
Overflow clipping trims paint without providing the scrolling behaviour of a scroll container. This affects how hidden content can be reached.
A clamp combines a minimum, a fluid middle value and a maximum. The ceiling keeps generous desktop spacing from growing indefinitely.
A magnified detail window needs a clipping area and an independently scaled subject. Scaling the outer frame would enlarge the wrong part.
Grid content alignment positions the track group when spare space remains inside the container. Alignment is harder to see when tracks fill all available space.
Reference codes often live inside cards with restricted selection. A local user-select rule lets the reader copy an identifier without dragging other text.
A widescreen frame establishes height from width without an arbitrary breakpoint. It makes embedded media more predictable as the parent resizes.
Selection styling needs foreground and background colours that remain readable as a pair. Test actual selected text rather than an isolated colour chip.
Opacity composites an element and its descendants together. Text inside a translucent panel will fade along with its background.
Border-box sizing includes padding and borders in a declared width. This is useful when several cards must share a precise grid.
Caret colour is a small edit with a large effect on dark inputs. Check the insertion point against normal, focused and selected backgrounds.
A single-line label avoids awkward breaks but can run wider than its parent. Decide where overflow belongs before disabling wrapping.
A resize cursor tells a pointer user which direction a handle moves. The drag behaviour and keyboard equivalent still need to be implemented by the control.
Fixed positioning follows a containing block that is usually the viewport. A transformed ancestor can establish a different reference frame.
The empty pseudo-class tests the DOM's contents. A text node introduced by indentation can change whether a placeholder appears.
A polygon clip can turn a square swatch into a diamond while its allocated layout box stays rectangular.
A price band is useful when an item appears on more than one order line. Group by item before choosing the smallest and largest unit prices.
A content-sized label can hug short text while still needing a boundary for long text. Intrinsic sizing lets the content influence the box.
Reading measure is a typography decision as much as a layout decision. A maximum width helps a text column stay readable on a wide screen.
Content-box sizing assigns the declared size to the content area. Padding and borders increase the final occupied space.
Rotation changes painting and hit testing while preserving the element's original layout footprint. Leave enough room for the rotated corners.
Ruby markup associates a short annotation with base text. CSS controls its arrangement while the HTML retains the reading relationship.
A repeated line can suggest a perforation without requiring an image asset. Its rhythm should hold up as the panel width changes.
A list marker can carry instructional numbering while the list retains native ordered semantics. Keep the numbers legible at wrapping widths.
A radius follows the border box. Child backgrounds can still paint outside the curve unless clipping or matching radii are part of the design.
A flex row lays out siblings on its main axis. The children's minimum sizes determine how gracefully the row shrinks.