Design comparison
Solution retrospective
My first practice with grid and it went good so far, grid is a super powerful tool for making complex and customized pages, any suggestions would be really appreciated, I think my code needs to be more organized, I am thinking about trying the BEM methodology, but any other alternative would be good Again I wanna remind you that practice makes perfect, keep coding and keep trying and you'll achieve what you want. HappyCoding :)
Community feedback
- @GrzywNPosted over 2 years ago
Hey @Njoura7! Great job on the challenge!
What I could recommend to you is to try out some Sass/SCSS project architecture e.g. sass 7-1 pattern. You can read about it here (also there is a lot more in this page about sass overall). It's great to have a nice boilerplate and just put everything into files which are made for it e.g. mixins or variables. It would make your projects much easier to read and maintain after all.
Also I have some minor suggestions regarding your solution:
- Universal selector
*
already selects body and html tags, so putting them with it is unnecessary. Also it might be good practice to use *::before and *::after with regular universal selector, since universal selector doesn't normally work on pseudoelements. But it's up to you, since it wasn't even required in this project, since you didn't used them. - Font weight variables doesn't make much sense for me. Why is
fw-700
value a 600? If you really want to make variables for font-weights, you should name themfw-bold
orfw-semibold
for example. - Try to avoid using pseudoclasses like
:nth-child
. It's better to just make a class for these elements as you did with.card--1, .card--2, .card--4
. And it's also important to stay consistent throughout your project. - To fix accessibility issue with level 1 heading, you can make special class only for search engines and put something in there. More about it here.
Hope this helps! Have a nice day and of course keep coding!
Marked as helpful2@Njoura7Posted over 2 years ago@GrzywN thank you very much, that was really helpful, I'll use those tips for my next project for sure. also, I have a small question if you don't mind, did you notice that I had to duplicate my work in the main branch so that github pages read my index.html? how can I fix that? because I want to put all my work in "src" folder as a good p[practice for bigger projects
0@GrzywNPosted over 2 years ago@Njoura7 Solution I found. I personally don't use GithubPages, instead I use Netlify for my projects, Vercel is great too. I just login on Netlify with my github account than I select a repo with a base directory and it works perfectly.
1 - Universal selector
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