Přejít k hlavnímu obsahu
← 🎨 CSS as a design system·Modul B6 · Lekce 13
🔁 Krok 1 · Reprodukuj bugReproduce: build a .card div containing an <h3> and a <p>. The card must have width: 280px, padding: 16px, and a border. The <p> must contain a long unbreakable token (a URL like 'https://example.com/very-long-pathname-that-keeps-going-and-going-with-no-breaks'). When rendered, the URL will overflow the card — that's the bug we'll fix in step 2.

Opakujte hlášení o chybě: dlouhé adresy URL vyfukují kartu

150 XP12 minKrok 1 z 2 · Repro

Hlášení chyby

Mobile users report: 'The whole page scrolls sideways. I see a long URL sticking out of the card and the rest of the screen is cut off.' Screen recordings show a single product card with a URL in the description; on iPhone 13 the card is wider than the viewport and the page scrolls horizontally. Your job: build the SMALLEST HTML + CSS that triggers the same visual bug. Don't fix anything yet — just make it happen.

Teorie

Reading a bug report like an engineer

When you're new, "the layout is broken" feels overwhelming. Senior engineers do something specific: they reproduce the bug locally first, in the smallest possible code, before touching the actual codebase. This is the single highest-leverage habit you can build.

This lesson teaches it in two steps.

Step 1 — reproduce. You're handed a real-shape bug report. Your job: write the smallest HTML + CSS that triggers the same visual problem. You're not fixing anything yet. You're making the bug *show up on your screen*.

Step 2 — fix. Once your repro shows the bug, you'll get the standard fix task and the broken starter the rest of the team is staring at. Now you fix it.

Why this order matters

  • If you can't repro, you can't verify a fix. You might "fix" something that wasn't broken and ship a bug that still exists.
  • Repro forces you to read the bug report carefully — what device, what content, what action. Junior devs skip this and start grep-ing the codebase blind.
  • The minimal repro often IS the bug. Once you have 20 lines of HTML that show it, the cause is usually staring at you.

The actual content rule today

A common bug pattern: a card layout that looks fine with short text breaks on the right edge when content has a long unbreakable token — a URL, a hash, a German compound word. Fixed-width cards leak; the container overflows the screen; a horizontal scrollbar appears on mobile.

The fix is one CSS property. But first — reproduce the bug.

🔒

Zaregistruj se a začni programovat

Teorie je otevřená pro každého. Editor, živý náhled a check se odemknou s 7denní zkušební verzí zdarma — karta vyžadována, zrušíš kdykoli.

Registrace — zkušební verze zdarma →

Prvních 10 lekcí v každé trase je zdarma. Karta není potřeba.

← PředchozíDalší lekce →

Jeden tip k Pythonu nebo webu denně — e-mailem

Krátké, ručně psané, žádný spam. Odhlásit jedním klikem.