Design comparison
Community feedback
- @brunomoletaPosted 6 months ago
Hello Korney,
I cloned this repo of yours to take a closer look and these are the things I believe you can improve at:
When you do a
media-query
it's better to write:section.basket { [...] @media (min-width: var(--min-width)) { [...] } }
Writing the code this way, you first set the mobile styles and lastly handle the desktop layout. And the properties that apply to both sizes remain on all screens.
- divide your
less
files into multiple ones so that it's easier to maintain your codebase. For example: reset.less
dashboard.less
modal.less
- and so on;
As your css file had more than 1.200 lines, it's hard to find what we are looking for.
it's also not a good practice to make this many styles anchored to their parent directly on the tag, such as you did here:
section.about { align-items: flex-start; row-gap: 1.5rem; font-size: 0.9rem; line-height: 1.4rem; color: grey; > h2 { font-size: large; font-weight: bold; }
we're better off setting this h2 with an ID and then relating the style with the id as the html tag might change over time.
About the
html
: I had not seen themenu
tag, so I asked GPT about it. It said:It's deprecated.
On the internet, I found a human saying: In practical terms, it can be considered half-dead now, as it is only implemented in Firefox. so we better off withnav
.Also, review your use of the
</hr>
as you used it plenty in improper places. It should signal a change of scene in a story or a shift of topic within a section..Furthermore, every
input
needs to have a relatedlabel
, consider looking at that too.I sent you a PR on a new branch on GitHub. The code broke unintentionally, but please look as I did a bit of CSS reorganization, it might be helpful for your learning experience.
Oh, the JS is neat, congrats.
Best regards from Brazil: :)
Marked as helpful1@KorneyChervonenkoPosted 6 months ago@brunomoleta thanx a lot for very useful comments and spending time for looking into my work. PS It's only a pity that I can't work with git as you can
1 - divide your
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