This tests that the CSS caret appears for all heading levels (h2, h3, h4, etc.) in VitePress sidebar items.
z-index: 1 to ensure caret appears above other
elements
cursor: pointer to summary.itempadding-right: 32px to all heading levels to make
space for caret
margin: 0 to reset default heading marginsconst textTag = computed(() => {
return !hasChildren.value
? 'p' // Simple links use p
: props.depth + 2 === 7
? 'p' // Max depth uses p
: `h${props.depth + 2}` // Others use h2, h3, h4, h5, h6
})
Expected result: All items above should show a triangular caret on the right side that rotates when clicked.