Overview
The Dev Showcase portfolio implements a comprehensive responsive design strategy using CSS media queries to adapt layouts and interactions across all device sizes. Location:wwwroot/css/responsive.css
Responsive Strategy
Mobile-First Approach
The application uses a mobile-first design philosophy:- Base styles: Optimized for mobile devices
- Progressive enhancement: Additional features for larger screens
- Media queries: Add complexity as viewport increases
Fluid Layouts
Layouts use:- Flexible grids with CSS Grid and Flexbox
- Percentage-based widths
max-widthconstraints- Viewport-relative units (
vw,vh)
Breakpoints
The application defines five main responsive breakpoints:| Breakpoint | Width | Target Devices |
|---|---|---|
| Desktop Large | > 1200px | Large desktops, wide monitors |
| Desktop | 1025px - 1200px | Standard desktops, laptops |
| Tablet | 769px - 1024px | Tablets landscape, small laptops |
| Mobile Large | 481px - 768px | Tablets portrait, large phones |
| Mobile | ≤ 480px | Small phones |
Media Query Breakpoints
1200px and Below
Layout Changes
Projects Layout:1024px and Below
Navigation Changes
Sidebar Behavior:Component Adjustments
Language Selector:768px and Below
Header Adjustments
Typography
Layout
Grids
Filters
Carousel
Certificates
Chart Legends
640px and Below
480px and Below
Navigation
Positioning
Header
Layout
Panels
Statistics
Logos
Carousel
Projects
Charts
Certificates
Typography
Modals
Touch vs Desktop Interactions
Touch Device Detection
Glow Panels
Carousel Arrows
Navigation Menu Behavior
Desktop (> 1024px)
- Sidebar always visible
- Fixed position on left
- Main content offset by sidebar width
- No hamburger menu
- No overlay
Tablet/Mobile (≤ 1024px)
- Sidebar hidden by default (
transform: translateX(-100%)) - Hamburger menu button visible
- Click menu to slide in sidebar
- Dark overlay covers main content
- Click overlay or navigation item to close
- Body scroll locked when menu open
main.js:7-37):
Carousel Touch Support
Touch Events (carousel.js:147-215)
Touch Support:
touchstart/mousedown: Begin dragtouchmove/mousemove: Track finger/mouse positiontouchend/mouseup: Complete drag, snap to slide
- Minimum 5px movement to activate drag (prevents accidental drags on tap)
- Minimum 50px drag to trigger slide change
- Smooth animation on release
- Prevents default scroll during horizontal drag
Click vs Drag Detection
Layout Changes by Viewport
Grid Transformations
Projects Layout
- > 1200px: 2-column layout
- ≤ 1200px: 1-column stacked
Vocational Bars Grid
- > 1200px: 3 columns
- 1025px - 1200px: 2 columns
- ≤ 768px: 1 column
Tech Logos Grid
- > 1200px: 4+ columns (auto-fit)
- 769px - 1200px: 3 columns
- 481px - 768px: 2 columns
- ≤ 480px: 2 columns
Interactive Panels Grid
- > 1200px: 3+ columns
- 769px - 1200px: 2 columns
- ≤ 768px: 1 column
Carousel Visible Cards
- > 1200px: 2.1 cards (partial 3rd visible)
- 481px - 768px: 2 cards (1.1 in JS)
- ≤ 480px: 1 card at a time
Responsive Images
Base Styles (base.css:89-93)
- Images never overflow container
- Maintain aspect ratio
- No inline gaps (block display)
Responsive Typography
Font sizes scale down on smaller viewports:| Element | Desktop | 768px | 480px |
|---|---|---|---|
| h1 | 2.5rem | 2rem | 1.5rem |
| h2 | 2rem | 1.75rem | - |
| h3 | 1.5rem | 1.35rem | - |
| Header h1 | - | 2rem | 1.5rem |
| Header h2 | - | 1.25rem | 1rem |
Best Practices Applied
1. Mobile-First CSS
Base styles target mobile, enhancements for larger screens:2. Fluid Grids
Use CSS Grid withauto-fit and minmax():
3. Flexible Images
All images scale with container:4. Touch-Friendly Targets
Buttons and interactive elements sized for touch:5. Content-First Breakpoints
Breakpoints chosen based on when content needs adjustment, not device sizes.6. Progressive Enhancement
Core functionality works on all devices, enhancements for capable devices:- Base: Touch navigation works everywhere
- Enhancement: Hover effects on desktop
- Enhancement: Glow panels follow mouse on desktop
Testing Responsive Design
Browser DevTools
Chrome/Edge:- Open DevTools (F12)
- Click device toolbar icon (Ctrl+Shift+M)
- Select device or custom dimensions
- Test touch events with “Toggle device mode”
- Open DevTools (F12)
- Click Responsive Design Mode (Ctrl+Shift+M)
- Test various viewports
Test Different Breakpoints
Key widths to test:- 1920px (desktop)
- 1200px (breakpoint)
- 1024px (tablet/mobile toggle)
- 768px (mobile large)
- 480px (mobile)
- 360px (small phones)
Test Interactions
- Resize browser window to trigger responsive changes
- Test menu toggle at 1024px breakpoint
- Test carousel touch drag on mobile simulation
- Test hover effects with mouse vs touch
Related Files
wwwroot/css/responsive.css: All responsive styleswwwroot/css/base.css: Base styles and variableswwwroot/js/main.js: Responsive menu JavaScriptwwwroot/js/carousel.js: Touch-enabled carousel