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

3-Column Preview Card Component: HTML & CSS only

P
Jeff Guleserianβ€’ 480

@jguleserian

Desktop design screenshot for the 3-column preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


I would love feedback on any or all of the following:

  1. Organization and readability of the code - could you easily make sense of it if you and I were working on the same team?
  2. Efficiency of code - could I get the same result with less code?
  3. Best practices - am I following industry standards and practices that work on different browsers?
  4. Positive comments - I'll take as many as you want to give me, haha!
  5. Negative comments - please be gentle, :-0

Thank you for any time you could spend helping me out! Happy new year, Everyone!

Community feedback

P
Jeff Guleserianβ€’ 480

@jguleserian

Posted

Melvin,

Thank you for the feedback. I tell you, doing these challenges and having feedback from people has been so helpful, especially in respect to accessibility. It also makes me think about things I never questioned or thought to ask about - like setting the <main> to a min-height of 100vh to allow for structures that may expand beyond a viewport - or also like setting and "invisible" <h1> so a screen reader can identify and properly announce the main topic of a page like this one.

Concerning the resetting of the font-size in the <html>, I am in a real quandary since I get conflicting justifications and differing perspectives. On the one hand, there are the reasons stated in the two links you gave. On the other hand, most of these are overcome by resetting the default font size back to 16px, i.e., 1.6rem, in the <body>. Then the browser still acts like it did before but the calculations for rem are easier since rem reflects what was set in the html tag. Then, too, there is no need for endless calculations and long decimals and the extra typing of coding that results from setting variables for every font-size. I found this article interesting just in case you want to see what he has to say:

The 62.5% Font Trick

For me, the eventual use, or non-use, will probably have to conform to whatever my team does if/when I work with one on a future employment. And this, for me, seems to be the biggest argument against the use of a particular "trick" or "hack." Anyway, it's an interesting discussion, and I appreciate you pointing it out because I had taken it for granted that it was an accepted practice, but now I realize that it is not.

Anyway, my Friend, thank you for the advice and comments - they are golden! I'm looking forward to incorporating them into my work on the next project.

Jeff

1

@MelvinAguilar

Posted

@jguleserian Sorry for not responding sooner, but you replied to your solution and not to my message, so I didn't receive a notification

It's a very valid opinion, adapted to the workplace

0

@MelvinAguilar

Posted

Hi there πŸ‘‹. Good job on completing the challenge ! I have some feedback for you if you want to improve your code.

HTML:

  • You must use a level-one heading (h1) even though this is not a full-page challenge. You can create an '<h1>' element within your 'main' element that will be hidden visually but visible and readable by screen readers. The class "sr-only" hides content visually and here are the styles to copy. e.g.: <h1 class="sr-only">3-column preview card component</h1>
  • You should use the <a> tag instead of the <button> tag because the Learn More button is a link to another page. Use buttons to perform actions like submitting a form or closing a modal and use links to navigate to another page. You can read more about this here.

CSS:

  • Setting the font-size to 62.5% can attract compatibility issues with third-party libraries or plugins. You can read more about this with this two lectures:
  1. The Surprising Truth About Pixels and Accessibility - The 62.5% trick
  2. A comment on the 62.5% trick

Credit to grace-snow and vanzasetia for pointing this out.

  • Use min-height: 100vh to the container selector instead of height. This property lets you set a height and let the element grow even more if necessary.
main {
    /* width: 100vw; */
    /* height: 100vh; */
    min-height: 100vh;
     . . .
}

@media only screen and (max-width: 375px)
main {
    /* height: 100vh; */ 
}

I hope you find it useful! πŸ˜„ Above all, the solution you submitted is great!

Happy coding and Happy New Year! πŸŽ‰πŸŽŠπŸŽ

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