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

Custom CSS Library, used Flexbox and utility classes to style elements

node, react, sass/scss, vite
P
Arsalan2078•210
@Arsalan2078
A solution to the Blog preview card 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?

I am most proud of being able to use my custom css library. This will very significantly quicken styling process and reduce setup.

What challenges did you encounter, and how did you overcome them?

I encountered issues with css specificity, speficially with my padding classes which were generated automatically.


    Learning

p-xs-100 is responsible for mobile screen size padding on all sides, while pt-xs-50 and pb-xs-50 added padding on top and bottom respectively. The latter two didn't override paddings set by p-xs-100 class, which was generated after the two.

I addressed the issue by creating two scss loops:

  • First generates universal margins and paddings
  • Second generates margins and paddings on one side at a time
What specific areas of your project would you like help with?

I am not particularily happy with my typography, and there are definitely more techniques and tips I could use to improve upon scss.

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 Arsalan2078'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

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

Frontend Mentor

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

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