Comments (3)
Technically, yes, nested tabs are supported. However, the script that manages the behavior is over-matching tab lists and tab panels. This is a side-effect of imprecise CSS selector matching. If the code more carefully selected only the elements for the tabset the user is interacting with, then the nested tabs would work as expected.
any nested tabsets underneath show up as floating tabs without any content or border.
This only means that no tab (and its corresponding panel) is selected.
Here's the sketch of the logic the script needs to use:
forEach.call(tabs.querySelector('.tablist').querySelectorAll('.tab'), function (el) {
toggleSelected(el, el === tab)
})
var nextPanel = tabs.querySelector('.tabpanel')
while (nextPanel) {
toggleHidden(nextPanel, nextPanel !== panel)
if (!(nextPanel = nextPanel.nextElementSibling).classList.contains('tabpanel')) nextPanel = null
}
from asciidoctor-tabs.
Thanks for the quick response @mojavelinux! I've tested out the logic you provided and it seems to be working as expected š I'll continue to monitor this issue for updates on the official release/fix. Once it's available I'll be sure to do more testing as part of our workstream to migrate to the official asciidoctor-tabs extension. Thanks for all your help!
from asciidoctor-tabs.
I also found that if a table is contained without a tab in nested tabs, it was getting wrapped in a tablecontainer div twice. The root of the problem is the same. The selector that is used to process tables was going too deep.
from asciidoctor-tabs.
Related Issues (20)
- Sync tabs on hash change
- Tabs sync can cause content in view to jump HOT 1
- Feature request: installation instructions for NixOS HOT 2
- Align terminology with accessiblity guidelines for tabs HOT 1
- CSS to prevent table from overflowing has unwanted side effects
- Implement role attribute HOT 1
- Add option to save synced tab selection across pages HOT 3
- Only sync tabs with congruent tablists
- Add is-loaded to tabs blocks on next tick following initialization
- Allow sync group ID to be specified explicitly HOT 1
- Promote explicit ID on tab HOT 1
- Make default tab selection configurable HOT 2
- Don't remove open block enclosure if block has metadata (style, id, role, etc.) HOT 1
- Automatic tab number should respect document order
- Incorrect restriction of nodejs 16, but actually opal-compiler transpile code for nodejs 8+ HOT 1
- "skipping reference to missing attribute" in tabs HOT 3
- Error when using the extension with asciidoctor.js version 3.0.2 HOT 2
- Toggling external content HOT 1
- Opal throws an error with Antora HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asciidoctor-tabs.