Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Dropdown menus / button list #29

Closed
Jogai opened this issue Apr 4, 2019 · 4 comments · Fixed by #39
Closed

Dropdown menus / button list #29

Jogai opened this issue Apr 4, 2019 · 4 comments · Fixed by #39

Comments

@Jogai
Copy link

Jogai commented Apr 4, 2019

This project could benefit from a dropdown component like this I think: https://codepen.io/connorbrassington/pen/raNrEW (not mine, just a random example I found).

@yne
Copy link
Contributor

yne commented Sep 10, 2019

Here is a simple button dropdown sample:
(If you are looking for a dropdown navbar, it's a bit more tricky because position:absolute wrapper element don't play well with the current .nav implementation)

Preview

image

Code

<details class=dropdown>
    <summary class=button>action</summary>
    <div class=card>
      <p><a href="#">delete</a></p>
      <p><a href="#">rename</a></p>
      <p><a href="#">copy</a></p>
  </div>
</details>
details.dropdown {
  position: relative;
  display: inline-block;
}
details.dropdown > :last-child {
  position: absolute;
  left: 0;
  background: white;
  white-space: nowrap;
}

Live demo

https://codepen.io/qxc32034/pen/ZEzxZKP

@yne
Copy link
Contributor

yne commented Sep 11, 2019

@Jogai If a dropdown button is what you were you looking for, I can merge request it so we could close this ticket

@Jogai
Copy link
Author

Jogai commented Sep 12, 2019

Yeah, seems useful. The project I was using it for was on hold for a while, but just this week I discussed finalizing it so its right on time.

@jenil jenil closed this as completed Sep 12, 2019
jenil added a commit that referenced this issue Sep 14, 2019
Add .dropdown class (#29) and fix #36
@jenil
Copy link
Owner

jenil commented Sep 14, 2019

Ships in v0.7.0

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants