This is a hands-on styling lab where you'll write CSS to style various UI components from scratch. The HTML structure is provided, but you need to implement all the styling yourself.
By completing this lab, you will:
- Practice writing CSS for modern web components
- Learn to create consistent design systems
- Understand responsive design principles
- Implement interactive states (hover, active, focus)
- Work with CSS variables for theming
- Fork/Clone the Repository to have it locally
- Open the HTML file in a code editor (VS Code)
- Examine the HTML structure of each component
- Write CSS rules in the provided style file
- Open the HTML file in a browser to see your results
- Use developer tools to test and debug your styles
- Create cards with shadow effects
- Implement rounded corners
- Add hover effects with transitions
- Style card images and content areas
- Create a primary button style
- Implement success, warning, and info variants
- Create an outline button style
- Add disabled state styling
- Style buttons with icons
- Create rounded filter chips
- Implement active state styling
- Style chips with icons
- Add close button styling
- Create a horizontal navigation bar
- Style active state indicators
- Add hover effects
- Ensure proper spacing
- Style form labels and inputs
- Implement focus states
- Create consistent spacing
- Style textareas
- Make the component grid responsive
- Implement mobile-friendly styles
- Use media queries effectively
- Implement a color system using CSS variables
- Create theme switching functionality
- Ensure consistent theming across components
We've provided a set of CSS variables to help you maintain consistency:
:root {
--primary: #4361ee;
--secondary: #3a0ca3;
--success: #4cc9f0;
--warning: #f72585;
--info: #7209b7;
--light: #f8f9fa;
--dark: #212529;
--gray: #6c757d;
--light-gray: #e9ecef;
--white: #ffffff;
--card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
--transition: all 0.3s ease;
--body-bg: #f5f7ff;
--card-bg: #ffffff;
--text-color: #212529;
--border-color: #e9ecef;
}
- Start Simple: Begin with basic styling before adding advanced effects
- Use Developer Tools: Test and debug your styles in the browser
- Be Consistent: Maintain consistent spacing, colors, and styles
- Test Responsiveness: Check your styles at different screen sizes
- Reference Materials: Use MDN Web Docs and other CSS references
Your implementation will be evaluated on:
- Visual Design: Attractive and modern appearance
- Consistency: Uniform styling across components
- Functionality: Proper hover states and interactions
- Responsiveness: Works well on different screen sizes
- Code Quality: Well-organized and efficient CSS
If you finish early, try these additional challenges:
- Add animations to component interactions
- Implement a dark/light mode toggle
- Create additional component variants
- Add focus styles for accessibility
- Optimize your CSS for performance
- MDN CSS Reference
- CSS Tricks Guides
- Google Fonts
- Color Hunt for color palette inspiration
Submit your completed HTML file with all CSS implemented on GitHub. Include a brief document explaining your design decisions and any challenges you faced.
Good luck, and have fun styling!