Using CSS Breakpoints for Responsive Design
Breakpoints in CSS are defined using media queries to adjust layouts, typography, and elements based on the viewport width. They help ensure that a website looks and functions well across different screen sizes — from mobile to desktop.
Small screens (mobile): 480px – 640px
Medium screens (tablet): 768px
Large screens (desktop): 1024px
Extra large screens (wide desktop): 1280px or higher
You can customize breakpoints based on your project needs — these values are only guidelines.
In this example, styles scale up as the viewport width increases. Starting with a mobile-first approach, each breakpoint progressively enhances the layout for larger screens, maintaining readability and balance across devices.
How would you hide a navigation bar on screens smaller than the 'md' breakpoint using Tailwind CSS?
You applied Bootstrap's 'col-md-6' class but the columns don't stack on a phone. What might be causing that?
If you need a button to become full‑width only on extra‑small screens in Bootstrap, which classes would you use?
While building a three‑column layout that should collapse to a single column on tablets, which Bootstrap breakpoint utilities would you choose and why?
A component using Tailwind's 'lg:' utilities stopped responding after a recent CSS change. Walk me through how you'd debug the issue.
Explain how you would implement a responsive image that switches source at the 'md' breakpoint in a React component using Tailwind.
Our product mixes Bootstrap and Tailwind across micro‑frontends. How would you ensure breakpoint behavior stays consistent across both frameworks?
If a page suffers layout thrashing because many elements have breakpoint‑specific classes, what performance‑optimisation techniques would you apply?
Describe how you would create a shared design token file that defines breakpoint values for both Bootstrap and Tailwind in a large codebase.
We need to migrate a legacy codebase that uses custom media queries to Tailwind's breakpoint scale. What architectural considerations and migration plan would you propose?
How would you design a unified breakpoint strategy that supports a mobile‑first React SPA and a server‑rendered Rails app using Bootstrap, while keeping future scalability in mind?
When introducing a new breakpoint across multiple teams, how do you manage versioning, documentation, and backward compatibility to avoid breaking existing layouts?