Implement responsive testimonials grid with desktop, tablet, and mobil

Solution retrospective
- Add CSS Grid layout with responsive breakpoints
- Create custom color variables for consistent theming
- Implement smooth transitions for width changes
- Add tablet-specific layout for better UX
- Update README with solution screenshots and learnings
-
Grid Layout Complexity
- Creating a responsive grid that accommodates differently sized cards
- Managing the unique layout where the first card spans two columns and the last card spans two rows
- Ensuring the grid maintains visual hierarchy across different screen sizes
- Implementing a tablet layout that effectively breaks down the desktop design
-
Responsive Design Issues
- Cards initially stacked incorrectly in mobile view due to inherited grid positions
- Had to carefully consider breakpoints (768px for mobile, 1024px for tablet)
- Needed to adjust the container width (90% mobile, 75% tablet, 55% desktop) for optimal viewing
- Added max-width to prevent layout from becoming too wide on large screens
-
CSS Specificity Challenges
- Encountered issues with grid positioning rules conflicting between breakpoints
- Explored two solutions:
/* Solution 1: Using !important */ .card { grid-column: 1 !important; } /* Solution 2: Using specific selectors */ .card:nth-child(1), .card:nth-child(2)... { grid-column: 1; }
- Learned about the trade-offs between using !important and more specific selectors
-
Design and Styling Details
- Implementing the quotation mark background image with correct positioning
- Creating consistent card styles with proper border-radius and padding
- Managing text opacity for different elements (verified status, testimonial text)
- Styling profile images with border effects and proper sizing
-
Performance and Optimization
- Adding smooth transitions without affecting performance
- Using CSS custom properties for maintainable color management
- Organizing CSS with proper grouping of related properties
- Ensuring the layout transitions smoothly between breakpoints
N/a
Please log in to post a comment
Log in with GitHubCommunity feedback
- P@Ronnarit00000
Hey @tarekul Good work!.
Join our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord