Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted about 3 years ago

Four Card Feature Section

sass/scss
Anaz Anoiar•160
@AnazAnoiar69
A solution to the Four card feature section challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Hi need advice for responsive font size 🙏

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

  • Ivan•2,610
    @isprutfromua
    Posted about 3 years ago

    Hi there. You did a good job 😎

    keep improving your programming skills🛠️

    your solution looks great, however, if you want to improve it, you can follow these steps:

    • @import prevents parallel downloads, use <link> instead.
    1. @import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap");
    
    • Use relative units for font size, such as ems or rems. While modern browsers can smoothly zoom pixel-based layouts, sizing type in relative units ensures an entire layout can be scaled up or down by simply updating the font-size of the body element.

    • You Need to Stop Targeting Tags in CSS. When you add CSS directly on tags, your markup can’t change. Your style is tightly coupled to your DOM, and any change increases the risk of breaking things.

    I hope my feedback will be helpful. You can mark it as useful if so 👍

    Good luck and fun coding 🤝⌨️

    Marked as helpful
  • Raymart Pamplona•16,040
    @pikapikamart
    Posted about 3 years ago

    Hey, great work on this one. The desktop layout looks really nice, the site is responsive and the mobile state looks really nice as well.

    Others already gave their feedback which is nice to see, just going to add some suggestions as well and don't mind me if I re-iterate some ideas mentioned already:>

    • For the scss part, you don't really need to use:
    body {
      .... other selectors
    }
    

    You can just directly target the selectors like .container, this way you reduce specificity. Also, if you like, you can search about bem convention. This will help you manage css selectors and create more generic classes. For example, you will have something like:

    .cards{
      &__container {}
      &__list{}
      &__item{}
    }
    

    This way, you can group them properly if you think about it.

    • Adding max-width on the body tag to prevent the layout from stretching. If you try to zoom out on your browser, you'll see that the layout stretches, adding max-width will prevent that, just make sure to add margin: 0 auto so that the body will be centered.
    • These two text:
    Reliable, efficient delivery
    Powered by Technology
    

    Are just one single phrase, meaning instead of using p tag for the first one, use a single h1 to wrap both lines and just add max-width on the h1 so that it will limit and create that 2 lines.

    • The overall font-sizes could be bigger, right now some text are small and they are smaller than the design as well.
    • Remember to only use a single h1 for a site. The h1 typically use on the hero heading like the 2 lines above on the site. So each of the card titles could be replace by just h2.
    • Each images could use an aria-hidden="true" attribute so that it will be totally hidden.

    Those only. Again, great job on this one.

  • Ken•935
    @kenreibman
    Posted about 3 years ago

    Professionally and personally I use the clamp() function for truly responsive typography. This will genuinely take your responsive game up to a professional level.

    Check out this video: https://youtu.be/U9VF-4euyRo

  • Liyan Anajao•990
    @LiyanNguyen
    Posted about 3 years ago

    for responsive font-size I personally use these methods:

    1. use rem units, and change them via @media query for different viewports
    2. use width% percentages (depending on the container of the text)
    3. use vh/vw (I rarely use this but sometimes more convenient)

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 1st-party linked stylesheets, and styles within <style> tags.

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.

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

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