Skip to content

dostonnabotov/fem_news-homepage

Repository files navigation

Frontend Mentor - News homepage solution

This is a solution to the News homepage challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.

Table of contents

Overview

The challenge

Users should be able to:

  • View the optimal layout for the interface depending on their device's screen size
  • See hover and focus states for all interactive elements on the page

Screenshots

Desktop Preview

Desktop Preview in 3D

Mobile Preview in 3D

Links

My process

Built with

  • Semantic HTML5 markup
  • CSS custom properties
  • Grid and Flexbox
  • Fluid typography

What I learned

Practiced variable fonts in CSS:

@font-face {
  font-family: "Inter";
  font-display: swap;
  font-weight: 100 900;
  src: url("/assets/fonts/Inter-VariableFont.ttf") format("truetype");
}

Refereshed my knowledge on CSS counters (especially the decimal-leading-zero value):

.popular-cards {
  counter-reset: title-counter;
}

.popular-card__title {
  counter-increment: title-counter;
}

.popular-card__title::before {
  content: counters(title-counter, ".", decimal-leading-zero) " ";
}

Continued development

If you have any suggestions on how I can improve my code, please do let me know! I'll always look forward to learning new things.

Useful resources

Author

Acknowledgments

  • MDN Web Docs - For providing such a great resource for web developers.
  • Kevin Powell - For his amazing tutorials on CSS.