Logo Image
blog

Responsive Web Design: Best Practices

HTML5 & CSS3

icon-image

SCSS

icon-image

JavaScript

icon-image

TypeScript

icon-image

React

icon-image

Next.js

icon-image

Tailwind CSS

icon-image

Bootstrap

icon-image

ShadCN UI

icon-image

Styled Components

icon-image

GSAP

icon-image

Framer Motion

icon-image

Vite

icon-image

Shopify themes

icon-image

i18next & RTL

icon-image

Recharts

icon-image

Chart.js

icon-image

SaaS dashboards

icon-image

Figma to UI

icon-image

Dark / light mode

icon-image

4+ years

icon-image

Vistothemes

icon-image

Freelance UI

icon-image

NFT & crypto UI

icon-image

eCommerce UI

icon-image

WordPress CSS

icon-image

Remote-ready

icon-image

Muhammad Shahzaib

icon-image

Pixel-perfect

icon-image

Component architecture

icon-image

Live demos

icon-image

HTML5 & CSS3

icon-image

SCSS

icon-image

JavaScript

icon-image

TypeScript

icon-image

React

icon-image

Next.js

icon-image

Tailwind CSS

icon-image

Bootstrap

icon-image

ShadCN UI

icon-image

Styled Components

icon-image

GSAP

icon-image

Framer Motion

icon-image

Vite

icon-image

Shopify themes

icon-image

i18next & RTL

icon-image

Recharts

icon-image

Chart.js

icon-image

SaaS dashboards

icon-image

Figma to UI

icon-image

Dark / light mode

icon-image

4+ years

icon-image

Vistothemes

icon-image

Freelance UI

icon-image

NFT & crypto UI

icon-image

eCommerce UI

icon-image

WordPress CSS

icon-image

Remote-ready

icon-image

Muhammad Shahzaib

icon-image

Pixel-perfect

icon-image

Component architecture

icon-image

Live demos

icon-image
home

/

blog

2026-09-175 min read
Responsive Web Design: Best Practices

Responsive design stopped being about a handful of fixed breakpoints years ago. The more durable approach is mobile-first CSS plus fluid units that adapt continuously, with breakpoints reserved for genuine layout changes rather than every possible screen width.

Mobile-first, not desktop-first

Write the base styles for small screens, then add complexity with min-width media queries as the viewport grows. It's easier to add layout than to unwind desktop-only assumptions for mobile.

Fluid type and spacing with clamp()

clamp(min, preferred, max) lets a value scale smoothly with the viewport between a floor and a ceiling — no more three separate font-size rules per breakpoint for a heading that just needs to scale.

Images that respect the layout

srcset/sizes, or next/image in a Next.js project, serve an appropriately sized image per device instead of shipping a 2000px hero image to a 375px phone.

fluid-type.css
h1 {
  /* min 28px, scales with viewport, caps at 60px */
  font-size: clamp(1.75rem, 4vw + 1rem, 3.75rem);
}

.container {
  padding-inline: clamp(16px, 4vw, 32px);
}

Test on a real range of widths, not just the two or three you designed for — clamp() and auto-fit grids remove most of the guesswork, but there's no substitute for actually resizing the window.

← back to all writing

Muhammad Shahzaib

Frontend Developer

React & Next.js

TypeScript

Tailwind CSS

Muhammad Shahzaib

SaaS dashboards

Shopify themes

GSAP & Framer

Muhammad Shahzaib

ShadCN UI

RTL & i18next

Figma to UI

Muhammad Shahzaib

4+ years

Vistothemes

Freelance UI

Muhammad Shahzaib

Remote work

pixel-perfect

Muhammad Shahzaib

Frontend Developer

React & Next.js

TypeScript

Tailwind CSS

Muhammad Shahzaib

SaaS dashboards

Shopify themes

GSAP & Framer

Muhammad Shahzaib

ShadCN UI

RTL & i18next

UI-only scope

Muhammad Shahzaib

your mockups

production UI

Muhammad Shahzaib

Muhammad Shahzaib

Frontend Developer

React & Next.js

TypeScript

Tailwind CSS

Muhammad Shahzaib

SaaS dashboards

Shopify themes

GSAP & Framer

Muhammad Shahzaib

ShadCN UI

RTL & i18next

Figma to UI

Muhammad Shahzaib

4+ years

Vistothemes

Freelance UI

Muhammad Shahzaib

Remote work

pixel-perfect

Muhammad Shahzaib

Frontend Developer

React & Next.js

TypeScript

Tailwind CSS

Muhammad Shahzaib

SaaS dashboards

Shopify themes

GSAP & Framer

Muhammad Shahzaib

ShadCN UI

RTL & i18next

UI-only scope

Muhammad Shahzaib

your mockups

production UI

Muhammad Shahzaib

Muhammad Shahzaib

Frontend Developer

React & Next.js

TypeScript

Tailwind CSS

Muhammad Shahzaib

SaaS dashboards

Shopify themes

GSAP & Framer

Muhammad Shahzaib

ShadCN UI

RTL & i18next

Figma to UI

Muhammad Shahzaib

4+ years

Vistothemes

Freelance UI

Muhammad Shahzaib

Remote work

pixel-perfect

Muhammad Shahzaib

Frontend Developer

React & Next.js

TypeScript

Tailwind CSS

Muhammad Shahzaib

SaaS dashboards

Shopify themes

GSAP & Framer

Muhammad Shahzaib

ShadCN UI

RTL & i18next

UI-only scope

Muhammad Shahzaib

your mockups

production UI

Muhammad Shahzaib

Muhammad Shahzaib

Frontend Developer

React & Next.js

TypeScript

Tailwind CSS

Muhammad Shahzaib

SaaS dashboards

Shopify themes

GSAP & Framer

Muhammad Shahzaib

ShadCN UI

RTL & i18next

Figma to UI

Muhammad Shahzaib

4+ years

Vistothemes

Freelance UI

Muhammad Shahzaib

Remote work

pixel-perfect

Muhammad Shahzaib

Frontend Developer

React & Next.js

TypeScript

Tailwind CSS

Muhammad Shahzaib

SaaS dashboards

Shopify themes

GSAP & Framer

Muhammad Shahzaib

ShadCN UI

RTL & i18next

UI-only scope

Muhammad Shahzaib

your mockups

production UI

Muhammad Shahzaib

arrow-image

Start a project — tell me what you’re building and your timeline.

logo-image

I’m Muhammad Shahzaib—a frontend developer with 4+ years at Vistothemes and on freelance SaaS projects (Deedible, Next Health, Truckers Finder). I build pixel-perfect UI with React, Next.js, TypeScript, Tailwind, ShadCN, and Shopify—plus HTML/CSS templates, RTL bilingual layouts, and dashboard work with Recharts and Chart.js. UI only; no backend or APIs.

Muhammad Shahzaib Copyright © 2026. All Rights Reserved.