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

HTML and CSS

Jason Moody•300
@MoodyJW
A solution to the Order summary component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Nothing particular I'd like feedback on, but if you see anything wrong or that can be improved, let me know!

If you can help me out with this console error I'm seeing on the github pages site, that would be great! I updated everything to use Sass and for whatever reason I'm getting this error: Error with Permissions-Policy header: Unrecognized feature: 'interest-cohort'.

I got tired of looking for a solution and just made a branch for the pre-sass version and I'm using it for the live site. Seems to work fine! Whenever I switch to my master branch, I get that error. After an hour or so of trying to figure out wtf is going on, I gave up and here we are.

Edit: Turns out the error was caused by not having a file type on my css file, which I goofed on when I added Sass.

Thanks for any help!

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Raymart Pamplona•16,040
    @pikapikamart
    Posted almost 4 years ago

    Hey, great work on this one. Layout in desktop seems fine, but the buttons are outside of the container in my screen. I am using 1366x768. Mobile layout seems fine, but 375 is too small for mobile breakpoint. The 375 on the design is not the intended breakpoint, it is just design.

    Some suggestions would be:

    • I suggest not styling the html element. Place those background properties on the body tag. Usually, the html element will only contain:
      html {
      box-sizing: # value stated;
      font-size: 100%;
    }
    
    • Instead of using height: 100vh on the body tag, use min-height: 100vh on it. Using height: 100vh will limit the elements size according to the viewport's height. So even if the element or the website have many element, if it uses height: 100vh it won't logically captures them. min-height: 100vh is much better because it takes 100vh as minimum and it will expand if it needs to.
    • Adding padding to the top and bottom of the body tag so that it prevents the content from touching the sides.
    • In a website, you typically add main element. This makes the structure better and it guides screen reader users where they are when navigating on your website. On this one, the .main-container selector could have been using main element.
    • The alt text on the img should have been left empty like alt="". When you think an image is just being used as a decoration, you should left the alt be empty. If you think the image adds to the context? Use a descriptive alt. Since the image on this one is just a vector decoration, using alt="" is better.
    • The img as well of the music icon should have been using alt="".
    • I would have wrap the annual-plan with a heading tag like h2.
    • Do not position: absolute the footer. Leave it on the flow.

    Other than those, great work. But changing the breakpoint will be really good. Also, if you like, starting some projects using mobile first layout:>

    Marked as helpful

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
Frontend Mentor logo

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