Questions
29 of 33
1What is a breakpoint in CSS? Why are breakpoints used in responsive web design?
2What is the syntax for setting a breakpoint using a media query?
3What is the syntax for setting a breakpoint using a media query?
4What units are typically used for defining breakpoints (e.g., px, em, rem)?
5What happens if no breakpoints are defined in a responsive layout?
6How do breakpoints help in mobile-first design?
7How does CSS decide which breakpoint to apply when multiple match?
8What’s the difference between min-width and max-width in media queries?
9How can you create a layout that adjusts between two breakpoints?
10What is the difference between device-based breakpoints and content-based breakpoints?
11What is the role of the viewport meta tag in responsive design?
12How do breakpoints help in mobile-first design?
13How does CSS decide which breakpoint to apply when multiple match?
14What’s the difference between min-width and max-width in media queries?
15What is the difference between device-based breakpoints and content-based breakpoints?
16What is the role of the viewport meta tag in responsive design?
17What is the difference between using em and px in defining breakpoints?
18How do you handle overlapping or conflicting breakpoint rules?
19Can breakpoints be combined with CSS Grid or Flexbox?
20How do CSS container queries differ from traditional breakpoints?
21How can you implement responsive typography using breakpoints?
22How can you use logical operators (and, not, only) in media queries?
23How does pixel density (device-pixel-ratio) affect breakpoints?
24What is the difference between min-device-width and min-width?
25How do you use breakpoints in frameworks like Bootstrap or Tailwind CSS?
26How would you write a media query for screens smaller than 768px?
27How would you create a responsive navigation bar using breakpoints?
28How would you handle images that need to resize at specific breakpoints? How can you make font sizes scale smoothly between two breakpoints?
29How would you debug a layout that looks broken at a specific breakpoint?
30How would you optimize breakpoints for tablets vs. phones?
31How can you prevent layout jumps between breakpoints?
32How do you use CSS custom properties (variables) with breakpoints?
33How do breakpoints differ between desktop, tablet, and mobile-first strategies?
29 / 33

How would you debug a layout that looks broken at a specific breakpoint?

Difficulty: 5/10
responsive design, media queries, debugging tools

Responsive Images and Smooth Font Scaling with CSS Breakpoints

Handling responsive images and typography ensures that both visuals and text adapt gracefully across devices. CSS breakpoints help resize images and adjust font sizes for different screen widths, maintaining clarity and visual balance.

Techniques for Responsive Images
  1. 1

    Use max-width: 100% and height: auto to make images scale within their containers.

  2. 2

    Apply media queries to change image sizes or switch to alternative images at specific breakpoints.

  3. 3

    Use the HTML <picture> element or srcset for serving different image resolutions to various devices.

Example: Resizing Images at Specific Breakpoints

In this example, the image width changes at 768px and 1024px breakpoints to optimize layout and visual hierarchy across screen sizes.

Techniques for Smooth Font Scaling
  1. 1

    Use the clamp() function to define a minimum, preferred (fluid), and maximum font size.

  2. 2

    Combine relative units (vw, em, rem) to make font size responsive to viewport width.

  3. 3

    Use media queries for additional fine-tuning between major breakpoints.

Example: Fluid Typography Between Two Breakpoints

Here, clamp() ensures that font sizes grow smoothly between two breakpoints — never shrinking below the minimum or exceeding the maximum. This method provides a natural scaling effect without the need for multiple media queries.

Scenario Questions

0-2 years experience

  1. 1You have a card component that looks fine on desktop, but at the 768px breakpoint the columns collapse incorrectly. Walk me through how you'd debug the layout.
  2. 2If a flex container stops wrapping at a certain media query, what steps would you take to identify why.

2-5 years experience

  1. 1During a feature rollout, a navigation bar breaks its alignment only on tablets (width 600‑800px). How would you investigate and fix it, considering possible CSS specificity and media query ordering issues?
  2. 2You notice that a grid layout shifts unexpectedly at the 1024px breakpoint after a recent CSS refactor. Explain how you'd pinpoint the cause and decide whether to adjust the breakpoint or the grid definitions.

5-8 years experience

  1. 1Our product uses a shared design system with dozens of components. A new component's layout breaks at the 1200px breakpoint in some browsers. How would you approach debugging this at scale, ensuring the fix doesn't regress other components?
  2. 2When optimizing for performance, we want to minimize CSS reflows. A layout glitch appears only at a specific breakpoint; describe how you'd debug it while also evaluating the impact on render performance.

8+ years experience

  1. 1We are planning to migrate our legacy CSS to a utility‑first framework across multiple teams. Some existing responsive layouts break at certain breakpoints. How would you design a migration strategy that includes debugging and preventing breakpoint regressions?
  2. 2Our design system needs to support custom breakpoints per product line. A layout issue appears only for one product's breakpoint configuration. How would you architect the CSS (or CSS‑in‑JS) to make debugging such breakpoint‑specific bugs easier and maintainable across teams?

Follow-up Questions

  • Which devtools panel do you reach for first and why?
  • How do you ensure the fix doesn't introduce regressions in other breakpoints?
  • Can you share an example of a breakpoint bug that was hard to reproduce and how you finally caught it?
Share

Share via WhatsApp, X, Facebook, LinkedIn or copy link. Open Graph preview enabled.