Replies: 3 comments 3 replies
-
This is not how it actually works. If you have JavaScript managing tab states, then yes, it is possible the JS is changing states of unrelated tabs. It's possible I might be misunderstanding what you are saying, so you would need to clarify.
I cannot speak to your specific case, but it is possible one could find defining multiple tabs cumbersome. This is all subjective, so desiring a different, custom approach is fine as long as you are willing to put in the effort, which it sounds like you are.
This question seems ambiguous to me. If you are asking is there a tool that handles tabs exactly how you want to handle them, then I don't know. I don't exactly understand what you are trying to achieve. I can't quite conceptualize exactly what you are trying to do.
There may be, but I don't know off the top of my head. I don't necessarily have time to delve into figuring out custom solutions for people, unfortunately. I also don't have a clear grasp of what you are doing.
I'm not exactly sure what you are trying to do, so it is hard for me to answer. I'm still unclear on what you are trying to achieve.
I'd have to have explicit examples and code to understand exactly what you are doing. |
Beta Was this translation helpful? Give feedback.
-
You're right - I'm specifically referring to the behaviour where, on some of your clicks, you will notice that changing the first layer tab will "change the state" of the second layer tab. This is just a consequence of the two different instances of the "chocolate/vanilla" tabs not being synced up in any way, which is of course expected default behaviour. No worries on the other points! I just didn't want to reinvent the wheel if someone else had produced something similar, but it doesn't sound like it. I'll keep working on it, and if I have more specific problems I may come back here. Thanks for the response! |
Beta Was this translation helpful? Give feedback.
-
I think you are just seeing CSS animation stuff when changing tabs. You can probably remove transition animations. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi! Thanks for all your work on this repo :)
I am interested in making an extension that supports nested tabs inspired by the "install pytorch" table on this page, and this excellent tool. Essentially, I want a series of options, with a display at the end that is affected by all of them.
Naive implementation
This can be naively done with the tabs extension, as below for a "cookie recipe":
However, this leads to a lot of duplication (which would quickly get out of hand with more rows), and doesn't preserve state across tabs (changing the "milk/lactose free" option would change the "chocolate/vanilla" option back to its default).
My attempt
The solution I'm trying now supports templating of the output, like so:
Here, I process the content using jinja2 to create one content block for each possible combination during the
mkdocs build
step. This does still lead to a large number ofdivs
, with only one havingdisplay: block;
at a time.Questions
ConfigDisaply.on_markdown
to returnraw
, but then it doesn't do any highlighting on that. I'm a bit unclear on the order in which the content of the display is processed.Thanks for reading! Any advice is really appreciated :)
Beta Was this translation helpful? Give feedback.
All reactions