Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted about 2 months ago

blog-preview-card

node
GiiN•20
@GiiNtoki
A solution to the Blog preview card challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What are you most proud of, and what would you do differently next time?

I’m most proud of my growth in building clean, accessible, and maintainable UI components using semantic HTML and modern CSS techniques. One particular project that stands out is when I developed a modular blog preview card system. It wasn’t just about making it look good — I applied best practices like using custom properties for theme consistency, logical properties for i18n support, and flexible layout patterns like Flexbox and Grid.

What made me especially proud was not just delivering a polished UI, but also making it easy for other developers to reuse and scale it. That balance between design and engineering is something I really value.

I designed the layout with a mobile-first approach and implemented two breakpoints — one for mobile and one for larger devices — which worked well for the core experience. However, next time I’d add an additional breakpoint for mid-sized devices like tablets or small laptops. I realized that the transition between mobile and desktop wasn’t always smooth, and having a dedicated breakpoint for those in-between sizes would make the design more flexible and visually consistent across a wider range of screens.

What challenges did you encounter, and how did you overcome them?

One of the main challenges I encountered was getting the illustration image to properly fit its container inside the <figure> element. Initially, the image wasn’t respecting the container’s border radius and was leaving unwanted space on the right side, which disrupted the visual balance of the card layout.

I realized the issue was due to the image’s default inline behavior and missing sizing constraints. To fix it, I applied display: block, set the image’s width and height to 100%, and used object-fit: cover to ensure it filled the container without distortion. I also made sure the parent <figure> had overflow: hidden and the correct border-radius applied. These adjustments made the image scale correctly and align with the card’s design intent.

What specific areas of your project would you like help with?

I’d appreciate help with refining the responsiveness of the layout across a wider range of screen sizes — particularly mid-range breakpoints like tablets. Since I only implemented two breakpoints (mobile and large screens), I’d like feedback on how to better handle scaling and spacing in that in-between range.

I’m also open to guidance on accessibility best practices, especially around semantic HTML and how to improve keyboard and screen reader support for interactive elements. Lastly, any tips on structuring CSS more efficiently for scalability and reusability would be valuable as I continue building out components.

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Gregor de Cillia•190
    @GregorDeCillia
    Posted about 2 months ago

    Nice work!

    One thing you might try is to use clamp() for the medium screen sizes. I just completed this challenge and instead of breakpoints I used this.

    body {
      font-size: clamp(12px, 3.82vw, 16px);
    }
    

    It makes it so all em units scale linearly for mid-sized screens and have a fixed min and max.

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
Frontend Mentor logo

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

How does the accessibility report work?

When a solution is submitted, we use axe-core to run an automated audit of your code.

This picks out common accessibility issues like not using semantic HTML and not having proper heading hierarchies, among others.

This automated audit is fairly surface level, so we encourage to you review the project and code in more detail with accessibility best practices in mind.

How does the CSS report work?

When a solution is submitted, we use stylelint to run an automated check on the CSS code.

We've added some of our own linting rules based on recommended best practices. These rules are prefixed with frontend-mentor/ which you'll see at the top of each issue in the report.

The report will audit all CSS, SCSS and Less files in your repository.

How does the HTML validation report work?

When a solution is submitted, we use html-validate to run an automated check on the HTML code.

The report picks out common HTML issues such as not using headings within section elements and incorrect nesting of elements, among others.

Note that the report can pick up “invalid” attributes, which some frameworks automatically add to the HTML. These attributes are crucial for how the frameworks function, although they’re technically not valid HTML. As such, some projects can show up with many HTML validation errors, which are benign and are a necessary part of the framework.

How does the JavaScript validation report work?

When a solution is submitted, we use eslint to run an automated check on the JavaScript code.

The report picks out common JavaScript issues such as not using semicolons and using var instead of let or const, among others.

The report will audit all JS and JSX files in your repository. We currently do not support Typescript or other frontend frameworks.

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub