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

Product preview card component

material-ui, react, sass/scss, accessibility
Mathias Podesta•10
@mapodesta
A solution to the Product preview card component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


The most difficult challenge in this exercise was the responsive.

Maybe , I will try to improve the css (classnames or how to structure the css)

So this is my question, how improve the css in this exercise or how we can change to improve this

Kind Regards

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Brian Schooler•440
    @superschooler
    Posted almost 3 years ago

    Hi Mathias,

    A couple of quick suggestions that might improve your design:

    The word PERFUME at the top can be made closer to the original design by adding the following CSS:

    .css-t1nuxs {
    	text-transform: uppercase;
    	letter-spacing: 0.25em;
    }
    
    .css-t1nuxs span {
    	font-family: Montserrat, sans-serif;
    }
    

    Change media query to ~1,100px - between about 500px and 1,100px the page is a bit distorted.

    Add max-width to the container to limit it to about 1400px. Anything larger than that begins to add a lot of white space to the bottom of your Add to Cart button.

    Hope this helps, let me know if you have any other questions!

  • Furkan Rehber•230
    @rehberbey
    Posted almost 3 years ago
    • First of all, you should use the right colors. 🙃 Of course, you can add your own interpretation, but you should not go too far. Because when designing ui, I hope that it is already well thought out. 🎨
    • Typography is bad. Some very big, some very small. ✍️
    • It looks very strange if you set your screen to 600px width. When you increase the width above 3000px, the part of the component with the text stays too high. 💻
    • "So this is my question, how improve the css in this exercise or how we can change to improve this" I can't believe you actually asked this question!? 😵‍💫 If I'm not mistaken, you made this work using the react framework. You should learn CSS even before JavaScript. You should already know that. You have to find out if your problem is not being able to get things done using react or using CSS. If it's CSS, you should leave react aside and start CSS again.

    By the way, I'm a new developer too. It is not my intention to embarrass you. I just commented on your request as the end user. There is something for everyone to learn here.

    If you want to take a look at my work, I leave a link here. 😛 https://rehberbey.github.io/Frontend-Mentor-Challenges/

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