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

Used SASS (flexbox, grid, media queries) and plain JS

sass/scss, gulp
David•7,960
@DavidMorgade
A solution to the Intro section with dropdown navigation challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Had a lot of pain with the css, got it a bit spaguetti but I think is still undestable, this is my first project done by myself with no guideline and a lot of google/mdn/stackoverflow, did the resize at 900~ px because I think it looks better for a tablet to go the image first and then the text.

Hope of getting feedback of my JS (dropdowns and modals), and what can I improve on my SASS (a lot, I know)

Code
Couldn’t fetch repository

Please log in to post a comment

Log in with GitHub

Community feedback

  • mubizzy•1,520
    @mubizzy
    Posted almost 3 years ago

    Excellent job on this challenge!

    Hope it helps:)...don't forget to mark it as helpful 👍

    Marked as helpful
  • James•340
    @James-alderson
    Posted almost 3 years ago

    Hi David, the challenge you designed is very nice and well designed, there are just a few points that would help improve your design.

    1. Change the dropdown link to the dropdown button, in this case, when you click on it, it will no longer add the # sign to the url. best structure to create dropdown menu.
    2. Add a black shadow on the website content when clicking the menu button. Side Navigation.
    3. Use transitions instead of animation. Small changes from the challenge you designed:

    HTML:

    <div id="loading" class="modal__phone">
      ...
      <div class="modal__list">
        <a id="modal__phone--features" href="#">
          Features
          <img class="modal__list--img" src="build/img/icon-arrow-down.svg" alt="">
          <div class="modal__popup hiddenModal">...</div>
        </a>
    
        <a id="modal__phone--company" href="#">
          Company
          <img class="modal__list--img" id="phone__modal--arrow" src="build/img/icon-arrow-down.svg" alt="">
          <div class="modal__popup2 hiddenModal" id="modal-popup">...</div>
        </a>
        ...
      </div>
    </div>
    

    CSS:

    .modal__phone {
      position: fixed;
      top: 0;
      right: 0;
      bottom: 0;
      width: 225px;
      transition: right 0.3s ease-in-out;
      background-color: #fff;
      box-shadow: 0 10rem 10rem rgba(0, 0, 0, 0.486);
    }
    .modal__phone.hidden {
      right: -255px;
    }
    
    .modal__phone--close {
      cursor: pointer;
      margin: 3.3rem 1.2rem 0 auto;
    }
    
    .modal__list {
      display: flex;
      padding-left: 3rem;
      gap: 2rem;
      margin-top: 5rem;
      align-items: flex-start;
      flex-direction: column;
    }
    
    .hidden {
      display: initial;
      overflow: initial;
    }
    
    .header__list.hidden,
    .header__list2.hidden {
      display: none;
    }
    
    .hiddenModal {
      max-height: 0;
      overflow: hidden;
    }
    
    .modal__popup,
    .modal__popup2 {
      overflow: hidden;
      transition: max-height 0.3s ease-out;
    }
    .modal__popup {
      max-height: 167px;
    }
    .modal__popup2 {
      max-height: 123px;
    }
    
    .modal__popup ul {
      display: flex;
      padding: 1rem 0;
      justify-content: center;
      flex-direction: column;
    }
    .modal__popup2 ul {
      display: flex;
      flex-direction: column;
      justify-content: center;
      padding: 1rem 0;
    }
    
    .hiddenModal {
     max-height: 0;
    }
    

    In this code, some changes have been written to display the notification menu better, you can see the changes by placing it in your project code. (in mobile resolution)

    happy codding 🚀

    Marked as helpful

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 all CSS, SCSS and Less files in your repository.

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.

How does the JavaScript validation report work?

When a solution is submitted, we use eslint to run an automated check on the JavaScript code.

The report picks out common JavaScript issues such as not using semicolons and using var instead of let or const, among others.

The report will audit all JS and JSX files in your repository. We currently do not support Typescript or other frontend frameworks.

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