
Custom CSS Library, used Flexbox and utility classes to style elements
Design comparison
Solution retrospective
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
I am not particularily happy with my typography, and there are definitely more techniques and tips I could use to improve upon scss.
Community feedback
Please log in to post a comment
Log in with GitHubJoin 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