Giter VIP home page Giter VIP logo

product-preview-card-component-main'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

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

Desktop Design Mobile Design

Links

My process

Built with

  • VS Code
  • Responsively
  • Mozilla Firefox Developers editor
  • Semantic HTML5 markup
  • CSS custom properties
  • Flexbox
  • SASS
  • Mobile-first workflow

What I learned

I learned how to design cards based on just images and to do it responsively, also I practiced with flexbox, css and how to set-up gulp-sass environment in vscode, here is de build in CSS with used media query's. To implement media query in SASS I used the mixin's feature.

.card {
  border-radius: 1rem;
  background-color: hsl(0deg, 0%, 100%);
  width: 37.5rem;
}
@media (min-width: 37.5rem) {
  .card {
    width: 70rem;
    display: flex;
    direction: column;
  }
}

.contenedor {
  max-width: 85%;
  margin: 0 auto;
}
@media (min-width: 37.5rem) {
  .contenedor {
    margin: 0 4rem 0 4rem;
  }
}
.imagen {
  background-image: url(../../images/image-product-mobile.jpg);
  background-size: 100%;
  background-repeat: no-repeat;
  background-position: center;
  min-width: 100%;
  min-height: 25rem;
  border-radius: 1rem 1rem 0 0;
  margin: 0;
}
@media (min-width: 37.5rem) {
  .imagen {
    background-image: url(../../images/image-product-desktop.jpg);
    min-width: 50%;
    border-radius: 1rem 0 0 1rem;
  }
}
.header h1 {
  font-family: "Fraunces", serif;
}
@media (min-width: 37.5rem) {
  .header {
    margin-top: 4rem;
  }
}

Continued development

I need to improve my habilities to start a gulp-sass environment because at first it takes time to do

Useful resources

Author

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.