Skip to content
  • Learning paths
  • Challenges
  • Solutions
  • Articles
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 2 years ago

Responsive landing page using css grid, flex and sass

sass/scss, node
Leela•30
@vlpreddy
A solution to the News homepage challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


  1. When writing Saas, I felt difficult when using media queries, usually media queries being written inside class in SaaS, but my confusion was whether i should write media queries for children inside parent?

  2. I try to do some experiment with transitions, instead of simply using burger icon and javascript, i tried to use css trick for menu which is working but the rotation of the burger lines was not happening where they convert into cross, but i implemented this another website. so figuring out.

  3. I have questions related to performance, Do i have to use less classes for better performance? Do i use grid or flex which one is faster? Is position:absolute slower, do we have alternatives? I used position fixed to display menu items, is there any better way?

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Adriano•42,890
    @AdrianoEscarabote
    Posted over 2 years ago

    Hello Leela, how are you? I truly loved your project's outcome, however I have some advice that I hope you'll find useful:

    I noticed that you used a button in which case the best option would be an a, because in my head when a person clicks on a button written Read more, he is not confirming a form, or something like, it will be redirected to another page, to read more about!

    to solve this problem do this:

    <a href="/" class="button">Read more</a>

    Consider using rem for font size .If your web content font sizes are set in absolute units, such as pixels, the user will not be able to re-size the text or control the font size based on their needs. Relative units “stretch” according to the screen size and/or user’s preferred font size, and work on a large range of devices.

    if you want to continue coding with px, you can download a very useful extension in vscode, it converts px to rem! link -> px to rem

    The remainder is excellent.

    I hope it's useful. 👍

  • J Z•290
    @half-cto
    Posted over 2 years ago

    Hi Leela, great work on completing challenge.

    Regarding media queries, I like to set up a mixin like this one

    @mixin desktop {
        @media screen and (min-width: $desktop-size) {
            @content;
        }
    }
    

    and use it inside element I'm changing, I find it keeps clean structure and is easy to troubleshoot.

  • daniel mendoza•140
    @Jdanielmendoza
    Posted over 2 years ago

    esta genial..

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

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