/ecommerce-product-page

Ecommerce product page project, with add to cart and cart update functionalities with some complex layout

Primary LanguageSCSS

Frontend Mentor - E-commerce product page solution

This is a solution to the E-commerce product page challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.

Table of contents

Overview

The challenge

Users should be able to:

  • View the optimal layout for the site depending on their device's screen size
  • See hover states for all interactive elements on the page
  • Open a lightbox gallery by clicking on the large product image
  • Switch the large product image by clicking on the small thumbnail images
  • Add items to the cart
  • View the cart and remove items from it

Screenshot

Links

My process

Built with

  • Semantic HTML5 markup
  • CSS custom properties
  • Flexbox
  • CSS Grid
  • Mobile-first workflow
  • SCSS/SASS
  • Gulp
  • Tailwind CSS

What I learned

Just proud of this dynamic scss mixin I creted for transition, it accepts a property parameter with a default of 'all'

@mixin transition($prop: all) {
    transition: $prop .2s ease-in-out !important;
}

My first using the '&&' operator in place of the ternery operator or if/else

prevBtnLB.addEventListener('click', () => {
    currentImgLB--
    currentImgLB < 1 && (currentImgLB = 4)
    renderImgLB()
})

nextBtnLB.addEventListener('click', () => {
    currentImgLB++
    currentImgLB > 4 && (currentImgLB = 1)
    renderImgLB()
})

Continued development

Will try to master CSS animations

Useful resources

Google

Author

Acknowledgments

Me and myself