@@ -10,13 +10,18 @@ Create an SEO-optimized table of contents block that auto-generates from page he
1010
1111## Design Notes
1212
13- - Container has ` border: 1px solid rgba(0,0,0,0.08) ` , ` border-radius: 10px ` , ` padding: 1.25rem 1.5rem `
14- - Title is uppercase, ` 0.8125em ` , at ` 0.5 ` opacity, separated from list by a thin bottom border
15- - Links use ` opacity: 0.65 ` , transitioning to ` 1 ` on hover
16- - Active link gets ` font-weight: 600 ` and full opacity
17- - Font size is ` 0.875em `
18- - Collapsible uses ` <details>/<summary> ` with SVG chevron via CSS mask
19- - Dark mode: border adjusts to ` rgba(255,255,255,0.1) `
13+ - Inherits font-family from the active theme via ` font: inherit `
14+ - All colors derived from ` currentColor ` via ` color-mix() ` — automatically adapts to any theme (light or dark, any palette)
15+ - Container: ` background: color-mix(in srgb, currentColor 3%, transparent) ` , ` border: 1px solid color-mix(in srgb, currentColor 8%, transparent) ` , ` border-radius: 12px ` , ` padding: 1rem 1.25rem `
16+ - Title is uppercase, ` 0.8125em ` , at ` 0.6 ` opacity, separated from list by a thin bottom border
17+ - Links use ` opacity: 0.6 ` , with ` border-radius: 6px ` and ` padding: 0.2em 0.4em `
18+ - Links on hover get ` opacity: 1 ` and subtle ` currentColor ` -based background highlight
19+ - Active link gets ` font-weight: 600 ` , full opacity, and ` currentColor ` -based background
20+ - Ordered lists (` ol ` ) show CSS counters (e.g. "1. ", "2. ") via ` ::before ` pseudo-elements with ` tabular-nums `
21+ - Nested sublists have a left border guide line derived from ` currentColor ` ; nested ` ol ` sublists get independent counters
22+ - Font size is ` 0.875em ` , line-height ` 1.5 `
23+ - Collapsible uses ` <details>/<summary> ` with SVG chevron via CSS mask; summary has hover background
24+ - No separate dark mode rules needed — ` color-mix(in srgb, currentColor, transparent) ` adapts automatically
2025- Headings inside ACF blocks (` data-acf-block ` wrappers) are excluded from TOC by default
2126
2227## Fields
0 commit comments