feat: improved ToC highlighting
This commit is contained in:
parent
b93eddea6b
commit
c2fa587935
16 changed files with 636 additions and 115 deletions
|
@ -7,7 +7,7 @@ const Card = React.forwardRef<
|
|||
>(({ className, ...props }, ref) => (
|
||||
<div
|
||||
ref={ref}
|
||||
className={cn('bg-background rounded-xl border', className)}
|
||||
className={cn('rounded-xl border bg-background', className)}
|
||||
{...props}
|
||||
/>
|
||||
))
|
||||
|
|
|
@ -23,13 +23,15 @@ export function ModeToggle() {
|
|||
theme === 'dark' ||
|
||||
(theme === 'system' &&
|
||||
window.matchMedia('(prefers-color-scheme: dark)').matches)
|
||||
|
||||
|
||||
document.documentElement.classList.add('disable-transitions')
|
||||
|
||||
document.documentElement.classList[isDark ? 'add' : 'remove']('dark')
|
||||
|
||||
window.getComputedStyle(document.documentElement).getPropertyValue('opacity')
|
||||
|
||||
|
||||
window
|
||||
.getComputedStyle(document.documentElement)
|
||||
.getPropertyValue('opacity')
|
||||
|
||||
requestAnimationFrame(() => {
|
||||
document.documentElement.classList.remove('disable-transitions')
|
||||
})
|
||||
|
@ -65,4 +67,4 @@ export function ModeToggle() {
|
|||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue