Skip to content

SefalaThabiso/product-preview-card-component-main1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Frontend Mentor - Product preview card component solution

This is a solution to the Product preview card component challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.

Table of contents

Note: Delete this note and update the table of contents based on what sections you keep.

Overview

The challenge

Users should be able to:

  • View the optimal layout depending on their device's screen size
  • See hover and focus states for interactive elements

Screenshot

Links

My process

Built with

  • Semantic HTML5 markup
  • CSS custom properties
  • Flexbox
  • CSS Grid
  • Mobile-first workflow

Note: These are just examples. Delete this note and replace the list above with your own choices

What I learned

I learn to use html to replace images at a certain width

To see how you can add code snippets, see below:

        <picture class="product__img">
          <source
            srcset="./images/image-product-desktop.jpg"
            media="(min-width: 460px)"
          />
          <img
            src="./images/image-product-mobile.jpg"
            alt="Picture of a perfume bottle laying on it's side"
          />
        </picture>

Also to hide elemnts while making them visible to screen readers

 <p class="product__original__price">
              <span class="visually-hidden">Current price:</span>
              <s>$169.99</s>
            </p>
  /* ie9+ */
.visually-hidden:not(:focus):not(:active) {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

Continued development

Im still not great with grid. I need to improve using it. I also still feel like an impster so i need to feel more confident with coding.

my biggest drawback is completing a project by myself without comsulting youtube tutorials. I hope to gain the experience nessesary to work on a project by myself.

Useful resources

Author

Acknowledgments

I would like to thank kevin powell for great youtube tutorials and everyone who commented on my solutions. Learning alone is hard but having a community which support you is great

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published