Git Product home page Git Product logo

order-summary-component's Introduction

Frontend Mentor - Order summary card solution

This is a solution to the Order summary card 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:

  • See hover states for interactive elements

Links

My process

Built with

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

What I learned

More practice with manipulating box-shadows to help highlight and/or add contrast to certain elements. In this particular project I added a box-shadow around the entire card element in order to add some contrast between it and the background colors, as shown below:

.card {
    /* other styles */
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.3);
}

Note that we aren't using the X or Y offsets, allowing us to surround the entire element with the box-shadow.

I also added a small box-shadow directly beneath the 'Proceed to Payment' button to add some contrast.

.btn--purple {
	/* other styles */
    box-shadow: 0 15px 20px -15px rgb(64, 82, 97);
}

Note the use of spread to make it appear as if the box-shadow is only on one side (in this case, the bottom).

Continued development

Work on implementing BEM naming conventions and practices. Separate CSS into sections (layout, utilities, global, etc). Keep CSS dry!

Author

order-summary-component's People

Contributors

patricia-hurst 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.