
There is an issue I've been struggling with for about two days, I have a tabbed navigation system I've been trying to get to work with the button tabs, however I want the tabs to be highlighted when the relevant tab is active. I also would like to use the same navigational tabs to show/hide sections within a repeating_section. If someone could give me like a basic example of how to do this using repeating sections, it would be very much appreciated. My tabbed navigation code: HTML: <input type="hidden"
class="sheet-tabstoggle" name="attr_sheetTab" value="character" /> <div> <button type="action" name="act_core">Core </button> <button type="action" name="act_gear">Gear </button> <button type="action" name="act_advancements">Advancements</button> <button type="action" name="act_npc">NPCS </button> </div> CSS: /*Configure the tab buttons*/ .charsheet .sheet-section-core, .charsheet .sheet-section-gear, .charsheet .sheet-section-advancements, .charsheet .sheet-section-npc { display: none; } /* show the selected tab */ .charsheet .sheet-tabstoggle[value="core"] ~ div.sheet-section-core, .charsheet .sheet-tabstoggle[value="gear"] ~ div.sheet-section-gear, .charsheet .sheet-tabstoggle[value="advancements"] ~ div.sheet-section-advancements, .charsheet .sheet-tabstoggle[value="npc"] ~ div.sheet-section-npc { display: block; } Sheet Workers: <script type="text/worker"> const buttonlist =
["core","gear","advancements", "npc", "…"];
buttonlist.forEach(button => {
on(`clicked:${button}`, function() { setAttrs({
sheetTab: button }); }); }); </script>
I am hoping to use the similar code as above, to do this inside of repeating sections. Also have two other small questions, the first is, currently the bane of my existence is trying to determine a css style's hierarchy on the page for making styles that actually function. Is there a reliable way to find this using the browser inspect or any other tool? Second, does anyone know a good reference or cheat-sheet for updating from the legacy styles to the more modern versions used by r20?