Design
Good design goes beyond appearance. Typography, layout, usability, and the small decisions that make digital experiences feel right.
Browse 35 articles in this topic. View all topics.
- Test responsive layouts with awkward content
Test responsive layouts with long titles, missing images, empty fields, translations, slow loading, keyboard navigation, and zoom before publishing.
- Defensive CSS for Long Words, URLs, and Unexpected Content
Defensive CSS keeps layouts usable with long text, missing images, and larger labels. Choose wrapping, cropping, and sizing rules that match real content.
- 1fr vs minmax(0, 1fr) in CSS Grid
Compare 1fr with minmax(0, 1fr) in CSS Grid. Control track minimums, handle wide content, and keep sidebar layouts usable when the screen gets narrower.
- Fix Flexbox Overflow With min-width: 0
Use min-width: 0 to let flex items shrink below their automatic minimum. Handle long text, ellipsis, and code blocks without hiding useful content.
- Stop Scrollbar Layout Shifts With scrollbar-gutter
Use scrollbar-gutter to reserve space for classic scrollbars. Compare stable and both-edges, handle panels, and understand why overlay scrollbars differ.
- Better Vertical Text Alignment With text-box-trim
CSS text-box-trim adjusts space around text using font metrics. See cap and baseline edges, heading and button examples, plus readable browser fallbacks.
- Draw shaped borders with CSS border-shape
CSS border-shape lets borders and shadows follow a custom outline. Compare it with clip-path, try complete examples, and keep a usable rounded fallback.
- CSS corner-shape Goes Beyond Rounded Corners
CSS corner-shape adds bevels, scoops, and squircles to ordinary boxes. See how it works with border-radius, normal borders, and a rounded-card fallback.
- CSS Calculations With sibling-index() and sibling-count()
Use CSS sibling-index() and sibling-count() for staggered animations and position-based calculations, with working examples and browser support checks.
- Round CSS sizes to fixed steps with round()
CSS round() snaps responsive values to useful steps. See rounding strategies, spacing scales, and a column calculation, with browser support checks.
- Better Line Breaks With CSS balance and pretty
Use text-wrap balance for short headings and text-wrap pretty selectively for longer copy without hard-coded line breaks.
- Why 100vh Doesn’t Always Fit a Mobile Screen
Why 100vh can exceed the visible mobile screen. Choose svh, lvh, or dvh, let content grow, and put older Safari workarounds in their historical context.
- Making Links Easy to Recognize
Make links recognisable with underlines, clear focus states, useful text, and behaviour that does not surprise the reader.
- A More Useful 404 Page in Hugo
Turn Hugo's 404 page into a useful route back to the homepage, search, or content visitors may have wanted.
- Smoother Page Changes With View Transitions
Use the View Transition API for same-page state changes and progressive cross-document animation on a normal multi-page site.
- When to use CSS clip-path or mask
Choose between CSS clip-path and mask by deciding whether the element needs a hard boundary or levels of transparency.
- Fading images with CSS masks
Use CSS masks for image fades, scroll hints, cutouts, and recolourable icons without changing the source asset.
- Responsive shapes with CSS shape()
Use the CSS shape() function for scalable clipping paths with lines and curves, while keeping a simple fallback.
- The Modern CSS Color Functions I Find Useful
Practical uses for oklch(), color-mix(), relative colors, and light-dark() in modern CSS.
- CSS Scroll-Driven Animations Without JavaScript
Link CSS animations to scrolling for progress bars and reveal effects without maintaining scroll event listeners.