Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted about 4 years ago

Checkout summary

Badr•10
@Badr281
A solution to the Order summary component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


I want to know want i miss exactly on this exercise for enhance my skills on front also some recommanded resource thanks in advance

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Anton•515
    @antarya
    Posted almost 4 years ago

    Hi Badr,

    Great start. Nice job.

    I have a couple of suggestions, though:

    HTML

    • It is better to separate CSS styles into their own file. For starters, it will be more organized. Later you may switch to scss and/or use tools like postcss which will generate CSS files for you, and you will be working with separate CSS files. Three methods of applying CSS to a document.

    CSS

    • While your class names are pretty good, you might also want to know about another often used format called BEM.

    • It is a bad practice to use id for styling; the reason is that you cannot reuse it later in your code. id is used to identify elements uniquely. In more complex applications, you will have elements that will look the same so that you can apply the same class, e.g. btn.

    • Take a look at the mobile-first approach. The basic idea is first to take care of mobile-related styles and overwrite desktop styles using media queries. Mobile First.

    • Try not to use fixed width and height, instead use alternatives min-width, max-width, min-height, max-height. That way, you do not restrict your element, and it can adapt to content. In a real application, you do not control the size of the text; it will be dynamic. So it would be best if you create styles that can adapt to the content.

      For example, you have height: 90vh on .checkout-card, if you start changing the viewport's height, you will notice that your content will be outside of your container at some point. Give elements to breathe and adapt, and when required, limit visually using max, min versions.

    • I noticed that you are using float and position to position elements of the #changeParent. I think you can do it much easier using flexbox. Here are some resources: Flexbox Game MDN Flexbox CSS tricks can be used as cheatsheet

    • On the solutions page, you have the ability to compare results with the initial design; play with it and check things like font-family, font-color, font-size, line-height, space between elements, padding, border-radius, shadow. Eventually, you will train your eye to notice differences.

    • If you want the background not to repeat itself, you can use the no-repeat value on background-repeat.

    • For more resources, also check frontendmentor resources page.

    I hope this will be helpful.

    Keep up the good work! Cheers!

  • Badr•10
    @Badr281
    Posted almost 4 years ago

    Thanks for your feedback, really that is so helpful for me to stick out some concept and improve my codebase thinking in frontend, ill take all the point that you noticed here and wish doing the best on the next challenge. Cheers

Join our Discord community

Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!

Join our Discord

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

How does the accessibility report work?

When a solution is submitted, we use axe-core to run an automated audit of your code.

This picks out common accessibility issues like not using semantic HTML and not having proper heading hierarchies, among others.

This automated audit is fairly surface level, so we encourage to you review the project and code in more detail with accessibility best practices in mind.

How does the CSS report work?

When a solution is submitted, we use stylelint to run an automated check on the CSS code.

We've added some of our own linting rules based on recommended best practices. These rules are prefixed with frontend-mentor/ which you'll see at the top of each issue in the report.

The report will audit all CSS, SCSS and Less files in your repository.

How does the HTML validation report work?

When a solution is submitted, we use html-validate to run an automated check on the HTML code.

The report picks out common HTML issues such as not using headings within section elements and incorrect nesting of elements, among others.

Note that the report can pick up “invalid” attributes, which some frameworks automatically add to the HTML. These attributes are crucial for how the frameworks function, although they’re technically not valid HTML. As such, some projects can show up with many HTML validation errors, which are benign and are a necessary part of the framework.

How does the JavaScript validation report work?

When a solution is submitted, we use eslint to run an automated check on the JavaScript code.

The report picks out common JavaScript issues such as not using semicolons and using var instead of let or const, among others.

The report will audit all JS and JSX files in your repository. We currently do not support Typescript or other frontend frameworks.

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub