/Product-Preview-Card-Component

Solution for the Product Preview Card Component challenge on frontendmentor.io

Primary LanguageCSSGNU Affero General Public License v3.0AGPL-3.0

Frontend Mentor - Product Preview Card Component solution

CodeFactor Grade FrontendMentor

This is a solution to the Product Preview Card Component. Frontend Mentor challenges help you improve your coding skills by building realistic projects.

Table of contents

Overview

A simple project using HTML5 and CSS3 that displays product preview card component (similar to a landing page for a featured product) consisting of a product image and data (name, description and price) and button linking to a checkout functionality.

Screenshot

Product-Preview-Card-Component

Links

My process

  1. I started with the markup on index.html, complying with HTML5 semantic tags and standards as much as possible.
  2. The styling provided by the project briefing was implemented first, followed by the classes I came up with on the markup.
  3. I used Figma to acquire all the right dimensions involved in the layout and implemented them in the appropriate CSS classes.
  4. The CSS Cube methodology was used when coding the stylesheet and some of the conventions from BEM were used when naming classes.

Built with

  • Semantic HTML5 markup
  • Cube CSS methodology

What I learned

  • For some reason CSS media queries will work perfectly when in a local environment but will break whenever deployed to production unless a targeting similar to @media only screen is implemented. I can't tell why, but it works.
  • This was the first time I implemented a multi- to single-column responsive design on Frontend Mentor and it worked as intended.