Questions
4 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?
04 / 33

What units are typically used for defining breakpoints (e.g., px, em, rem)?

Difficulty: 4/10
responsive units, breakpoint strategy, CSS sizing

Common Units for CSS Breakpoints

Breakpoints in CSS are typically defined using absolute or relative units, depending on how flexible the design needs to be. The most commonly used units are px, em, and rem, each serving different purposes in responsive web design.

Common Units Explained
  1. 1

    px (pixels) — The most common and precise unit; ideal for fixed breakpoints based on specific device widths.

  2. 2

    em — Relative to the font size of the element; allows scaling with user preferences or zoom levels.

  3. 3

    rem — Relative to the root font size (html element); ensures consistent scaling across the document.

Example: Using Different Units for Breakpoints

Scenario Questions

0-2 years experience

  1. 1We need a simple two‑column layout that switches to a single column on small screens. Which unit would you use for the breakpoint and why?
  2. 2If a designer gives you a breakpoint of 768px, how would you translate that to em or rem assuming a base font size of 16px?

2-5 years experience

  1. 1Your team switched a media query from px to em and suddenly the layout breaks on some devices. Walk me through how you would debug the issue.
  2. 2When deciding between px and rem for breakpoints in a component library, what factors would you weigh and how would you document the decision?

5-8 years experience

  1. 1You are designing a responsive design system used across many products. How would you standardize breakpoint units to balance design fidelity and user‑controlled scaling?
  2. 2Explain how using rem‑based breakpoints could impact performance or rendering on low‑end devices, and what mitigations you might employ.

8+ years experience

  1. 1Our legacy codebase defines all breakpoints in px, but we want to migrate to a fluid, rem‑based system without breaking existing pages. Outline a migration strategy that minimizes risk across multiple teams.
  2. 2At a company‑wide level, how would you set a policy for breakpoint units that accommodates both design consistency and accessibility requirements, and how would you enforce it across front‑end squads?

Follow-up Questions

  • What are the accessibility implications of using em/rem for breakpoints?
  • How does device pixel ratio affect a breakpoint defined in px?
  • Can you mix units in a single media query? What should you watch out for?
Share

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