-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add dropdown-group directive #17
Comments
This works quite well: .dropdown-group .dropdown .summary-title {
border-bottom: 0 !important;
font-weight:700 !important;
}
.dropdown-group .dropdown:not(:last-child) {
margin-bottom: 0 !important;
border-radius: 0 !important;
}
.dropdown-group .dropdown:first-child,
.dropdown-group .dropdown:first-child .summary-title {
border-radius: 1rem 1rem 0rem 0rem !important;
}
.dropdown-group .dropdown:last-child,
.dropdown-group .dropdown:last-child .summary-title {
border-radius: 0rem 0rem 1rem 1rem !important;
}
.dropdown-group .dropdown:last-child {
margin-bottom: 24px !important;
} |
I was exactly searching for a way to group dropdowns and could not find one, so I am adding my use case as well (pretty similar to the image posted above): we have a few domains that contain a variable number of datasets. It would be great to be able to have a nested dropdowns, because wrapping dropdowns into a |
Hey @stefanodavid, actually in lieu of a built-in solution, I implemented this in one of my other projects, using the This is the file: This is the custom CSS: and this is the rendered page 😄: Let me know if that works for you? I should circle back round at some point, to basically copy this implementation into sphinx-panels. |
hi @chrisjsewell well, you're right, I saw If i can add one (OT) remark, I think that if it were possible to "stack" the dropdown horizzontally, you could even mimic Thanks a lot! |
Thanks, yeh any feedback is great 😄
Yes indeed, that was in the thinking (see #28).
good shout, this didn't come up in #16, added there |
Good point. I read discussions in other issues but did not think about the no-JS thing. Just guessing, but.... there is already a kind of "togglebutton" functionality for dropdowns (HTML's |
Yeh I'm sure I talked about this in an issue somewhere (but I can't remember which one and which repo!). |
Just a quick thought on drop-down groups: why not use the same pattern that we use for tabs with the 'tabbed' directive? AKA if the directives are successive they're treated as part of the same group and the stylings of the first are applied to all others (and perhaps they are joined together somehow). |
Yeh basically. Just a way to orchestrate the style of a group of dropdowns with a default style and adding a bottom/top margin for the group. So rather than:
You could have:
Originally posted by @chrisjsewell in #15 (comment)
The text was updated successfully, but these errors were encountered: