Design comparison
Solution retrospective
Was fun to build. I used a function to convert px to rem. I was wondering if that was a fine way to do it, as well as using SASS modules to split the css media queries in multiple CSS files so I didn't have one long file. Any feedback would be appreciated.
Community feedback
- @gfunk77Posted 10 months ago
Hey @tbeagle2 !
Nice job on your solution. This one is really challenging. Congrats. I would suggest a few things mainly about your project setup.
- create a styles folder and put your scss and css in there and keep your assets in an assets folder. You currently have your styles with all of your assets and that makes it pretty hard to navigate.
- use mixins for repeated styles. For example, on multiple elements you set a font-size, font-weight, and line-height. A mixin for that would work really well and reduce your lines of code.
- Consider separating your scss files so that each files performs a specific task. For example, a file containing only variables, a file for mixins, a file for base document styles.
- you have a big config file for an html/scss project. Consider looking into something like Parcel. It is super easy to use and the docs are clear and concise. With a couple of lines of code in a package.json file, you’ll be set to go.
I hope these suggestions are helpful. Nice job on the project
Marked as helpful1@Jalex-McPosted 10 months ago@gfunk77 Thank you! Yeah, I was noticing my styles folder was getting messy. I'll organize it better on the next one. That sounds smart for the mixins, I always think I don't need them but I need to do more pre-production and keep count on what styles will be repeated and such. I can separate them like I do for the media queries. I'm guessing the config file is from prepros, I don't understand why that is. But i'll look into Parcel or use node next time if that keeps the config small. Thank you so much for the suggestions!
0
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