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

Mobile first using SASS

David•80
@DavidAlex17
A solution to the Stats preview card component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


i would like to say this challenge made me realize i have a lot to learn in web development. not just that, but git/github as well. i have a long way to go, so please any constructive criticism on anything specific or in general would be much appreciated.

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Amon•2,560
    @A-amon
    Posted about 4 years ago

    Hello! Great work~ The responsiveness works well.

    I'd like to offer a few suggestions:

    1. Add .. at the front to your background-image path because the image isn't showing up.

    2. Place the h2 and p tags outside of ul tag because I don't think it's semantically correct plus, it doesn't describe the list.

  • banadikt•5
    @banadikt
    Posted about 4 years ago

    I don't have much time to give you lots of feedback as I need to revise my solution also but... you can try this picture tag. It basically gives you more flexibility when you need to use multiple images for different resolutions. In this case when screen width is bigger than 715px use desktop version otherwise use mobile version. Also I saw you didn't get your transparency to work on the image. I'm sure there's many ways you can do this but what I have done is to have this picture tag or img whatever you decide to use enclosed in a div. Set div background to that purple and set the opacity lower so it becomes more transparent and blends in with the purple fade. Good luck!

    <picture>
            <source media="(min-width:715px)" srcset="./images/image-header-desktop.jpg">
            <img src="./images/image-header-mobile.jpg" alt="Office workers at the desk">
    </picture>
    
  • Jaydi•355
    @ruedasjnthn
    Posted about 4 years ago

    use display:block to show your image

    also use text -align: left to correct the layout of your design, u can achieve this using media queries to help you change layout as the screen size changes

  • diamond-js•75
    @diamond-js
    Posted about 4 years ago

    lol... That was also how I felt when I took this challenge. Nice design though... But seriously frontend mentor needs to work on their screenshots

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

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

Oops! 😬

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

Log in with GitHub