Giter VIP home page Giter VIP logo

Comments (7)

andybrewer avatar andybrewer commented on May 29, 2024 1

Awesome! Would you mind including a screenshot in the PR?

from mvp.

andybrewer avatar andybrewer commented on May 29, 2024 1

Added to v1.3

from mvp.

DiemenDesign avatar DiemenDesign commented on May 29, 2024

Oh, also, I've used mvp here, works great, nice and clean, and clean markup.
https://diemendesign.github.io/AussieOwned/

from mvp.

DiemenDesign avatar DiemenDesign commented on May 29, 2024

Had a little bit of a play around:
Styling:

/* Nav */
nav {
    align-items: center;
    display: flex;
    font-weight: bold;
    justify-content: space-between;
    margin-bottom: 0;
}

nav ul {
    list-style: none;
    padding: 0;
}

nav ul li {
    position: relative;     <---- added
    display: inline-block;
    margin: 0 0.5rem;
}
/* Dropdown */
  nav ul li:hover ul li {
    display: block;
  }

  nav ul li ul li {
    position: absolute;
    top: 1.2em;
    left: -.75em;
    display: none;
    height: auto;
    background: #fff;
    border: 1px solid var(--color-bg-secondary);
    padding: .5em 2em;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow) var(--color-shadow);
  }

Markup:

<nav>
  <ul>
    <li><a class="active" href="link.html">Link</a></li>
    <li><a href="link.html">Link</a>
      <ul>
        <li><a href="link.html">Dropdown</a></li>
      </ul>
    </li>
  </ul>
</nav>

from mvp.

andybrewer avatar andybrewer commented on May 29, 2024

Good question. The primary goal of MVP.css is a a no-class stylesheet for simple sites. If they can be done simply and without classes I'd be open to including them.

from mvp.

DiemenDesign avatar DiemenDesign commented on May 29, 2024

The code above, doesn't use classes to achieve a simple nav dropdown, the "active" class above in the HTML is just a remnant of me playing and isn't used, it doesn't exist in the styles above it.
If your happy with it I'll gladly do a PR.

from mvp.

DiemenDesign avatar DiemenDesign commented on May 29, 2024

PR with Screenshot added, thanks for such a cool project. I am considering adding a theme to my project AuroraCMS as a minimilst theme, and adding some extra classes but concentrating on keep as much without classes as you have done.

from mvp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.