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

How do breakpoints differ between desktop, tablet, and mobile-first strategies?

Understanding Breakpoint Strategies: Desktop-First vs. Mobile-First in CSS

Breakpoints define how a layout adapts to different screen sizes. The main difference between desktop-first, tablet-first, and mobile-first strategies lies in the direction of design scaling and how media queries are applied.

1. Mobile-First Strategy
  1. 1

    Start designing for small screens first, then progressively enhance for larger screens.

  2. 2

    Uses min-width media queries to add styles as the viewport grows.

  3. 3

    Encourages performance optimization since mobile styles load first.

Example: Mobile-First Approach
2. Desktop-First Strategy
  1. 1

    Start with large screens and simplify layouts for smaller screens.

  2. 2

    Uses max-width media queries to apply changes as the viewport shrinks.

  3. 3

    Was common in early responsive designs but less efficient today for mobile performance.

Example: Desktop-First Approach
3. Tablet-First or Hybrid Strategy
  1. 1

    Focuses on medium breakpoints (e.g., tablets) and adjusts up or down as needed.

  2. 2

    Useful for web apps or designs where tablet use is primary.

  3. 3

    Combines both min-width and max-width queries for flexible control.

Example: Tablet-Focused Hybrid Breakpoints

In summary, a mobile-first approach using min-width is the most widely adopted today because it prioritizes small devices and scales up gracefully. Desktop-first may still be used for legacy systems, while hybrid strategies work best for tablet-centric applications.

Difficulty: 5/10
Topics: responsive design, media queries, breakpoint strategy

Scenario Questions

0-2 years experience
  1. 1

    You're given a simple landing page with a hero image. How would you set up CSS so that the layout switches at 768px for tablets and 1024px for desktops using a mobile‑first approach?

  2. 2

    If a button looks fine on your phone but gets cut off on a tablet, what breakpoint would you adjust and why?

2-5 years experience
  1. 1

    We have a product card component that looks good on mobile, but on tablets the grid collapses incorrectly. Walk me through how you'd debug the breakpoint definitions to fix it.

  2. 2

    Our design system defines breakpoints at 600px, 900px, and 1200px, but the marketing team wants a new tablet breakpoint at 800px. How would you incorporate that without breaking existing desktop styles?

5-8 years experience
  1. 1

    When scaling our site to support a new large‑screen TV experience, what considerations would you make about our existing mobile‑first breakpoint strategy, and how might you restructure the media queries to avoid specificity wars?

  2. 2

    Explain how you would organize breakpoint variables and media query mixins in a large codebase to keep mobile, tablet, and desktop styles maintainable and performant.

8+ years experience
  1. 1

    Our legacy monolithic CSS uses desktop‑first breakpoints, and we need to migrate to a mobile‑first approach across dozens of micro‑frontends. Describe the migration plan, tooling, and how you'd mitigate regression risk.

  2. 2

    How would you design a cross‑team breakpoint policy that balances design fidelity on tablets, performance on low‑end mobiles, and future‑proofing for new device categories?

Follow-up Questions

  • What factors influence where you place a breakpoint?
  • How would you verify that changes don’t break existing layouts?
  • Can you describe any performance considerations with many media queries?