Inline TOC list style overrides

This commit is contained in:
2025-11-18 23:49:08 +08:00
parent 6ca024b0ba
commit 3509b43643
2 changed files with 6 additions and 15 deletions

View File

@@ -104,7 +104,11 @@ export function PostToc() {
style={{ top: `${indicator.top}px`, opacity: indicator.opacity }} style={{ top: `${indicator.top}px`, opacity: indicator.opacity }}
aria-hidden="true" aria-hidden="true"
/> />
<ul ref={listRef} className="toc-list space-y-1"> <ul
ref={listRef}
className="space-y-1"
style={{ listStyleType: 'none', paddingLeft: 0, margin: 0 }}
>
{items.map((item) => ( {items.map((item) => (
<li <li
key={item.id} key={item.id}
@@ -112,6 +116,7 @@ export function PostToc() {
itemRefs.current[item.id] = el; itemRefs.current[item.id] = el;
}} }}
className={`relative ${item.depth === 3 ? 'pl-3' : 'pl-0'}`} className={`relative ${item.depth === 3 ? 'pl-3' : 'pl-0'}`}
style={{ listStyleType: 'none' }}
> >
<a <a
href={`#${item.id}`} href={`#${item.id}`}

View File

@@ -59,20 +59,6 @@ body {
pointer-events: none; pointer-events: none;
} }
.toc-list {
list-style: none !important;
padding-left: 0 !important;
margin: 0 !important;
}
.toc-list li {
list-style: none !important;
padding-left: 0 !important;
}
.toc-list li::marker {
content: '' !important;
}
@keyframes hero-sweep { @keyframes hero-sweep {
0% { 0% {