This is a solution from Dimitris Kaffes to the Blog preview card challenge on Frontend Mentor.
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.
Users should be able to:
- See hover and focus states for all interactive elements on the page
- Solution URL: blog-preview-card solution on Github
- Live Site URL: blog-preview-card live site
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
.
- Semantic HTML5 markup
- CSS custom properties
- Flexbox
-
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.
Study in more detail the Andy Bell's: A (more) Modern CSS Reset in more detail.
- A (more) Modern CSS Reset - This helped me include in my code the proposed (by many FED mentors) CSS reset.
- How to make the whole card clickable using the pseudo-content trick described here.
- Frontend Mentor - @dkaffes
Thanks to the developer Andy Bell for his CSS Reset.