You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the sync group ID is derived automatically by joining the sync ID of each tab in the tablist. This mandates that tabs blocks be congruent (i.e., have the same tablist) in order to participate in the same sync group. Allow this group ID to be overridden so tabs blocks which are non-congruent (i.e, have a different tablist) can participate in the same sync group.*
The group ID can be specified using the sync-group-id attribute on the block. For example:
[tabs]
====
A:: A
B:: B
====
[tabs,sync-group-id=A|B]
====
A:: A
B:: B
C:: C
====
Since Asciidoctor doesn't currently support passing through data attributes to the HTML, use a CSS class to pass this attribute (e.g, data-sync-group-id=A|B). The tabs script will need to detect the presence of this CSS class and convert it to a data attribute in place of the automatically derived one.
* Keep in mind that if a tab is selected that's not in other tabs blocks in the same group, the default tab for that tabs block will be selected when the page is reloaded.
The text was updated successfully, but these errors were encountered:
If the sync group ID contains spaces, replace them with a no-break space in the HTML, the convert those characters back to a space when initializing the tabs. This replacement prevents the DOMTokenList from breaking up the value.
mojavelinux
added a commit
to mojavelinux/asciidoctor-tabs
that referenced
this issue
Jan 31, 2023
Currently, the sync group ID is derived automatically by joining the sync ID of each tab in the tablist. This mandates that tabs blocks be congruent (i.e., have the same tablist) in order to participate in the same sync group. Allow this group ID to be overridden so tabs blocks which are non-congruent (i.e, have a different tablist) can participate in the same sync group.*
The group ID can be specified using the
sync-group-id
attribute on the block. For example:Since Asciidoctor doesn't currently support passing through data attributes to the HTML, use a CSS class to pass this attribute (e.g,
data-sync-group-id=A|B
). The tabs script will need to detect the presence of this CSS class and convert it to a data attribute in place of the automatically derived one.* Keep in mind that if a tab is selected that's not in other tabs blocks in the same group, the default tab for that tabs block will be selected when the page is reloaded.
The text was updated successfully, but these errors were encountered: