Design comparison
Solution retrospective
For this one, my prouds are mostly because the design being flat made me figure out most of what should I do in the design at first sight. About what to do next time... part of the code got scrambled because of inline svg.
What challenges did you encounter, and how did you overcome them?A challenge for me is more about sizing the content to get as close as possible to the original design. This actually can't be overcomed easily because it's more of a "try and error" situation.
Community feedback
- @StroudyPosted about 2 months ago
Amazing job with this! You’re making fantastic progress. Here are some small tweaks that might take your solution to the next level…
- These
<div>
should really have semantic tags like headings (<h1> to <h6>
) and paragraphs (<p>
) convey structure and meaning to content, improving accessibility, SEO, and readability by helping search engines and screen readers interpret the content.
<div class = "tag">Learning</div> <div class = "date">Published 21 Dec 2023</div>
-
Using
font-display: swap
in your@font-face
rule improves performance by showing fallback text until the custom font loads, preventing a blank screen (flash of invisible text). The downside is a brief flash when the font switches, but it’s usually better than waiting for text to appear. -
I think you can benefit from using a naming convention like BEM (Block, Element, Modifier) is beneficial because it makes your CSS more organized, readable, and easier to maintain. BEM helps you clearly understand the purpose of each class, avoid naming conflicts, and create reusable components, leading to a more scalable codebase. For more details BEM,
-
This does not matter that much at this stage but something to be mindful of for SEO(Search Engine Optimisation),
<meta>
description tag missing that helps search engine determine what the page is about, Something like this<meta name="description" content="description goes here" />
You’re doing fantastic! I hope these tips help you as you continue your coding journey. Stay curious and keep experimenting—every challenge is an opportunity to learn. Have fun, and keep coding with confidence! 🌟
Marked as helpful1@LonlysoftPosted about 1 month ago@Stroudy thanks for your tips!
I didn't knew about the font-display. It seems pretty useful. I'm sure going to use it next time when I use a local font.
About the
<div>
s I actually didn't think in using an heading or a<p>
there because at first I didn't interpreted that as a necessity. But it's sure important to use semantic tags in text as you said.About BEM, didn't know about it, but I think I've used something like that before in some personal project that I'm still developing. (I used more to reduce my code lines because there were elements that were always using the same 6 properties so I created a class just for that) But since here there weren't elements that got styles in common I just didn't use it.
About the meta tag, I just forgot to write it there because I thought it wasn't important to do it there.
But again. Thanks a lot for your feedback!
1@StroudyPosted about 1 month agoHey @Lonlysoft, Look at this BEM Cheat sheet It will explain it better, Its not about similar styles, Its a naming convention. You got this bro! 💪
0 - These
- @decorator-factoryPosted about 2 months ago
- The card is not responsive. Because it's using a fixed width, it will overflow when there's not enough space. I would use a
max-width
instead: hint the browser instead of forcing a specific value - The heading is a bit too small on desktop. It should be 24px (this way it is the main point of focus when someone is browsing a page). For the same reason the publishing date and the tag should be a bit smaller: they are secondary details. I also think the text is easier to read with a line-height of 1.5 on the description
- I'm not sure why the image is included as inline SVG. It's definitely better to include images as separate files (for caching, reusing the image, editing the image, and code readability)
- A small accessibility improvement would be using the <time> tag for the post date
1 - The card is not responsive. Because it's using a fixed width, it will overflow when there's not enough space. I would use a
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