Responsive design in 2026 looks nothing like it did in 2020. We've moved beyond simple breakpoints and media queries into a world of truly fluid, context-aware interfaces.
At Flip Beetle, we're building websites that adapt not just to screen size, but to user needs, device capabilities, and content context. Here's how we do it.
Beyond Media Queries
Media queries aren't dead—they're just not enough anymore.
The old approach:
/* Desktop first (outdated) */
.card { width: 33.33%; }
@media (max-width: 768px) { .card { width: 100%; } }
The modern approach: Combine multiple techniques for truly responsive design:
- Container queries
- CSS Grid with auto-fit
- Fluid typography with clamp()
- Logical properties
- Preference-based adaptations
Let's explore each.
1. Container Queries: Component-Level Responsiveness
Container queries are the biggest leap in responsive design since media queries themselves.
The problem with media queries: They respond to viewport size, not component context. A sidebar component might need different layouts in different containers—but media queries can't know the difference.
Container queries solution: Components adapt based on their container's size, not the viewport.
Basic Implementation
/* Define the container */
.sidebar {
container-type: inline-size;
container-name: sidebar;
}
/* Query the container */
@container sidebar (min-width: 400px) {
.widget {
display: grid;
grid-template-columns: 1fr 1fr;
}
}
Real-World Example
Our blog cards:
.blog-grid {
container-type: inline-size;
}
/* Compact layout in narrow containers */
@container (max-width: 500px) {
.blog-card {
flex-direction: column;
}
.blog-card__image {
aspect-ratio: 16 / 9;
}
}
/* Side-by-side in wider containers */
@container (min-width: 501px) {
.blog-card {
flex-direction: row;
}
.blog-card__image {
aspect-ratio: 4 / 3;
max-width: 200px;
}
}
Why this works: The same component adapts differently whether it's in a main content area or sidebar—without extra CSS classes or JavaScript.
Browser Support
Container queries are supported in all modern browsers as of 2024. For older browsers, use feature detection:
@supports (container-type: inline-size) {
/* Container query styles */
}
@supports not (container-type: inline-size) {
/* Fallback styles */
}
2. CSS Grid: Intrinsic Responsiveness
CSS Grid's auto-fit and minmax() create layouts that adapt without media queries.
Auto-Responsive Grid
.grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 2rem;
}
What this does:
- Creates as many columns as fit
- Each column is minimum 300px
- Columns grow to fill space
- Automatically wraps to new rows
Result: Responsive grid with zero media queries.
Our Portfolio Grid
.portfolio-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr));
gap: clamp(1rem, 3vw, 3rem);
}
Advanced technique: min(100%, 350px) prevents overflow on small screens while maintaining 350px minimum on larger screens.
3. Fluid Typography with clamp()
Typography that scales smoothly between minimum and maximum sizes.
The Old Way
h1 { font-size: 2rem; }
@media (min-width: 768px) { h1 { font-size: 3rem; } }
@media (min-width: 1024px) { h1 { font-size: 4rem; } }
@media (min-width: 1440px) { h1 { font-size: 5rem; } }
The Modern Way
h1 {
font-size: clamp(2rem, 5vw + 1rem, 6rem);
}
What this does:
- Minimum size: 2rem
- Preferred size: 5vw + 1rem (grows with viewport)
- Maximum size: 6rem
Result: Smooth scaling from mobile to desktop with one line of CSS.
Our Typography System
:root {
/* Fluid font sizes */
--font-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
--font-sm: clamp(0.875rem, 0.8rem + 0.375vw, 1rem);
--font-base: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
--font-lg: clamp(1.25rem, 1rem + 1.25vw, 2rem);
--font-xl: clamp(1.5rem, 1rem + 2.5vw, 3rem);
--font-2xl: clamp(2rem, 1rem + 5vw, 4rem);
--font-3xl: clamp(3rem, 2rem + 5vw, 6rem);
--font-4xl: clamp(4rem, 3rem + 5vw, 8rem);
}
Usage:
h1 { font-size: var(--font-4xl); }
h2 { font-size: var(--font-3xl); }
p { font-size: var(--font-base); }
4. Responsive Images: Modern Approaches
Native Lazy Loading
<img
src="hero.jpg"
alt="Hero image"
loading="lazy"
decoding="async"
>
Benefits:
- Loads images as they enter viewport
- No JavaScript required
- Improves performance
- Supported in all modern browsers
Responsive Image Formats
<picture>
<source
srcset="hero.webp"
type="image/webp"
>
<source
srcset="hero.avif"
type="image/avif"
>
<img
src="hero.jpg"
alt="Hero image"
>
</picture>
Result: Modern browsers get optimized formats (50-70% smaller), older browsers get JPEGs.
Responsive Sizing with srcset
<img
srcset="
hero-400.jpg 400w,
hero-800.jpg 800w,
hero-1200.jpg 1200w,
hero-1600.jpg 1600w
"
sizes="
(max-width: 600px) 100vw,
(max-width: 1200px) 80vw,
1200px
"
src="hero-800.jpg"
alt="Hero image"
>
What this does: Browser downloads the appropriately sized image based on screen size and resolution.
Our Standard: Next.js Image Component
<Image
src="/hero.jpg"
alt="Hero image"
width={1200}
height={600}
sizes="(max-width: 768px) 100vw, (max-width: 1200px) 80vw, 1200px"
priority={true} // for above-fold images
/>
Automatic optimization:
- Format conversion (WebP, AVIF)
- Size generation
- Lazy loading
- Blur-up placeholder
5. Fluid Spacing
Spacing that scales with viewport:
:root {
--space-xs: clamp(0.5rem, 1vw, 0.75rem);
--space-sm: clamp(1rem, 2vw, 1.5rem);
--space-md: clamp(1.5rem, 3vw, 2.5rem);
--space-lg: clamp(3rem, 5vw, 5rem);
--space-xl: clamp(6rem, 10vw, 10rem);
}
.section {
padding: var(--space-lg) var(--space-md);
margin-bottom: var(--space-xl);
}
6. Mobile-First Approach
Always start with mobile, then enhance for larger screens.
Why Mobile-First?
1. Performance: Mobile styles load first (smaller CSS, faster render) 2. Progressive enhancement: Add complexity only where needed 3. Simpler code: Easier to add features than remove them
Mobile-First Media Queries
/* Base styles (mobile) */
.nav {
flex-direction: column;
}
/* Tablet and up */
@media (min-width: 768px) {
.nav {
flex-direction: row;
}
}
/* Desktop and up */
@media (min-width: 1024px) {
.nav {
gap: 2rem;
}
}
7. Touch vs Hover: Interaction Adaptation
Different input methods need different interactions.
Hover States for Pointer Devices
/* Only show hover effects on devices with hover capability */
@media (hover: hover) and (pointer: fine) {
.button:hover {
transform: scale(1.05);
}
}
Touch-Friendly Targets
/* Ensure touch targets are large enough */
.button {
min-height: 48px; /* iOS/Android recommended minimum */
min-width: 48px;
padding: 12px 24px;
}
Our Approach: Adaptive UI
/* Base (touch-friendly) */
.card {
padding: 1.5rem;
}
/* Enhanced for hover devices */
@media (hover: hover) {
.card {
transition: transform 0.2s;
}
.card:hover {
transform: translateY(-4px);
box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}
}
8. Preference-Based Adaptations
Respect user preferences for better experiences.
Reduced Motion
/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
* {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
}
Dark Mode
/* Light mode (default) */
:root {
--color-bg: #fefae0;
--color-text: #1a1a1a;
}
/* Dark mode */
@media (prefers-color-scheme: dark) {
:root {
--color-bg: #1a1a1a;
--color-text: #fefae0;
}
}
High Contrast
@media (prefers-contrast: high) {
:root {
--color-border: #000;
--border-width: 2px;
}
}
9. Performance Optimization
Responsive design must be fast.
Critical CSS
Inline critical CSS for above-fold content:
<style>
/* Critical styles for immediate render */
body { margin: 0; font-family: system-ui; }
.hero { min-height: 100vh; display: flex; }
</style>
Resource Hints
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="dns-prefetch" href="https://analytics.example.com">
Responsive Loading
Load features only when needed:
// Load heavy features only on desktop
if (window.innerWidth > 1024) {
import('./desktop-features.js');
}
10. Testing Responsive Design
Device Testing
Test on real devices, not just resizers:
- iPhone (various models)
- Android (Samsung, Pixel)
- iPad
- Desktop (various browsers)
Tools We Use
Development:
- Chrome DevTools device mode
- Firefox Responsive Design Mode
- Browser Stack (cross-browser testing)
Testing:
- Real devices (maintain device lab)
- BrowserStack (automated testing)
- Lighthouse (performance audits)
Monitoring:
- Real User Monitoring (RUM)
- Core Web Vitals tracking
- Performance budgets
Real-World Implementation: Our Portfolio
Let's look at how we combine these techniques:
/* Container query-based grid */
.portfolio {
container-type: inline-size;
}
.portfolio__grid {
display: grid;
grid-template-columns: repeat(
auto-fit,
minmax(min(100%, 350px), 1fr)
);
gap: clamp(1rem, 3vw, 3rem);
}
/* Component adapts to container */
@container (max-width: 500px) {
.portfolio__card {
aspect-ratio: 1 / 1;
}
}
@container (min-width: 501px) {
.portfolio__card {
aspect-ratio: 4 / 3;
}
}
/* Fluid typography */
.portfolio__title {
font-size: clamp(1.5rem, 2vw + 1rem, 3rem);
}
/* Respect user preferences */
@media (prefers-reduced-motion: reduce) {
.portfolio__card {
transition: none;
}
}
Result: A portfolio that adapts to any context without JavaScript.
Common Mistakes to Avoid
1. Desktop-First Thinking
Starting with desktop and "fixing" mobile leads to bloated CSS.
2. Too Many Breakpoints
You don't need 10 breakpoints. 3-4 is usually enough:
- Mobile: < 768px
- Tablet: 768px - 1024px
- Desktop: > 1024px
- Large desktop: > 1440px (optional)
3. Pixel-Perfect Design
Embrace fluidity. Things don't need to look identical across devices.
4. Ignoring Touch
Don't assume all users have mice. Design for touch first.
5. Performance Afterthought
Responsive isn't just about layout—it's about loading the right assets for each device.
The Future of Responsive Design
What's next:
1. Container queries everywhere (already here!) 2. Style queries (adapt based on CSS properties) 3. Scroll-driven animations (animation tied to scroll position) 4. View transitions API (smooth page transitions) 5. CSS nesting (cleaner syntax)
Tools & Resources
Our Stack:
- CSS: Modern features (Grid, Flexbox, clamp, container queries)
- Framework: Tailwind CSS (utility-first)
- JavaScript: Minimal (only where needed)
- Build: Next.js (optimization built-in)
Learning Resources:
- MDN Web Docs
- CSS-Tricks
- Josh Comeau's blog
- Kevin Powell's YouTube
Let's Build Responsive Experiences
At Flip Beetle, responsive design isn't an afterthought—it's the foundation. Every site we build works beautifully from smartwatches to ultra-wide monitors.
Want a truly responsive website? Let's talk about your project.

