Skip to content

dkaffes/blog-preview-card

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Frontend Mentor - Blog preview card solution

This is a solution from Dimitris Kaffes to the Blog preview card challenge on Frontend Mentor.

Table of contents

Overview

A simple challenge without the need of a layout change between desktop and mobile view for the blog preview card.

A modern CSS reset (by Andy Bell) was implemented.

The challenge

Users should be able to:

  • See hover and focus states for all interactive elements on the page

Screenshot

Screenshot of the solution

Links

My process

The HTML was structured using semantic elements.

Custom properties were used for the colors.

A box for the image and another box for the text were used inside the parent card box.

The author icon and name were aligned using Flexbox.

CSS nesting and the & nesting selector were used for the focus, hover and active states of the .text--title-anchor.

Built with

  • Semantic HTML5 markup
  • CSS custom properties
  • Flexbox

What I learned

  • A revision of some basic stuff that I have already learned through the previously solved Front End Mentor (FED) challenges.

  • How to make the whole card clickable using a pseudo-content trick.

Continued development

Study in more detail the Andy Bell's: A (more) Modern CSS Reset in more detail.

Useful resources

Author

Acknowledgments

Thanks to the developer Andy Bell for his CSS Reset.