Build resilient CSS component layouts

8 steps · about 4 h 10 min · Intermediate

  1. Understand intrinsic size (guide, MDN Web Docs, 30 min)

    Predict how content establishes minimum and preferred dimensions before adding constraints.

  2. Bound flexible tracks (reference, MDN Web Docs, 30 min)

    Allow grid tracks to grow while preserving usable lower and upper limits.

  3. Use fluid bounded values (reference, MDN Web Docs, 25 min)

    Scale spacing or type with the viewport without losing minimum and maximum safeguards.

  4. Adopt logical properties (guide, MDN Web Docs, 35 min)

    Make spacing and alignment work across left-to-right, right-to-left and vertical writing modes.

  5. Respond to component width (guide, MDN Web Docs, 40 min)

    Change a component according to its container instead of the entire viewport.

  6. Handle unbroken content (reference, MDN Web Docs, 25 min)

    Prevent long URLs and tokens from forcing a component beyond its available width.

  7. Reserve media proportions (reference, MDN Web Docs, 25 min)

    Keep layout stable while responsive images or embedded media load.

  8. Stress-test the component (guide, MDN Web Docs, 40 min)

    Check narrow containers, zoom, long translations, missing media and reordered content before reuse.