GithubHelp home page GithubHelp logo

rynex-zv / product-preview-card Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.37 MB

Home Page: https://rynex-zv.github.io/product-preview-card/

CSS 31.77% SCSS 32.19% HTML 36.04%
challenge css html scss single-page

product-preview-card's Introduction

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

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

OverView

Links

My process

Built with

  • Semantic HTML5 markup
  • SCSS Superstar custom properties
  • chrome
  • JS inline

What I learned

-how to await in JS, and how to change attributes values. but what is resolve I have no idea, I tired passing x.setAttribute("c", "n"); in to it and the button did not work at all!

  let x = document.getElementById("submeter");
    x.onclick = async  ()=> {
      x.setAttribute("c","y");
      await resolveAfter2Seconds(10);
       x.setAttribute("c", "n");
    };
    function resolveAfter2Seconds(x) { 
        return new Promise((resolve) => {
          setTimeout(() => {
            resolve(x);
          }, 2100);
        });
      }

-SVG!! OOh SVG, the animation there is not that good, but 🎉animation🎉 I have spent on it over 6h to get the timing right.

-SVG: do not accept ::before and ::after on or in.

-Animation curve's it's not that difficult, but chrome divTools did help writing the CSS code.

 { 
  animation: 1.5s alternate cubic-bezier(0.31, -0.06, 0.3, 0.97);
 }

Continued development

-SVG needed a little more work on! -reducing duplicated lines. -using rem and em rather than px!

Useful resources

  • Krita - Tis is a drawing program but it have a nice futures like a ruler!!

Author

Acknowledgments

product-preview-card's People

Contributors

rynex-zv avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.