Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Blog preview card

@Salima-Laidi

Desktop design screenshot for the Blog preview card coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Community feedback

Djamel1133 470

@Djamel1133

Posted

Salam... Well done, your code is great but I have some advice:

  • Don't use default values in your code like line-height: 1.5.
  • Use variables for font-size, font-weight, colors, etc. Here is an example:
:root {
  --font-size-small: 0.875rem;
  --font-size-medium: 1rem;
  
  --font-weight-medium: 500;
  --font-weight-large: 700;
 
  --spacing-large: 2rem;

  --very-dark-cyan: hsl(159, 80%, 10%);
  --dark-cyan: hsl(158, 36%, 37%);
}

It is cleaner and more maintainable.

For the rest, it's great. Good job again and I hope this was helpful.

0
Adriano 36,770

@AdrianoEscarabote

Posted

Hi Salima-Laidi, Welcome to Front-end Mentor!!!

Hope you're doing well! I loved how your project turned out, but I’ve got a few suggestions that could be useful:

Consider using rem for font sizes. When font sizes are set in absolute units like pixels, users can't adjust the text size based on their preferences. Relative units like rem adapt to the screen size and user settings, making them more flexible across various devices.

If you'd rather keep using px, you can download a handy VS Code extension that converts pixels to rem automatically

link -> px to rem

The rest is fantastic.

Hopefully, you'll find it helpful. 👍

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join 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