Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted about 1 year ago

Mobile-first -product-preview-card

lij110397•230
@lij110397
A solution to the Product preview card component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What are you most proud of, and what would you do differently next time?

1. How to use preprocessor like SaSS

  • Define variables
$primary-color: #3498db;
  • Define mixin
  • Define combined rules

However, in this case, I don't think it is necessary to use SaSS, since there are limited variables.

2. How to add strikethrough

.strikethrough-text {
  text-decoration: line-through;
}

3. How to add a responsive picture The image source will change according to the media scale, instead of simply switching the size of image. source only indicate the source of the image. But most of css styles are still changed by img


        
        
        

This can match with media queries. The image will change and some other styles.

@media (min-width: 43rem)
What challenges did you encounter, and how did you overcome them?

When it is necessary to use preprocessor like SaSS to style the css codes? I did not use preprocessor in the project, but I still add one potential sass file if i would use sass.

What specific areas of your project would you like help with?

When it is necessary to use preprocessor like SaSS to style the css codes?

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on lij110397's solution.

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