fix: improve mdx code block pipeline
This commit is contained in:
@@ -271,15 +271,19 @@
|
||||
background-color: oklch(0.10 0 0 / 0.85);
|
||||
color: var(--color-code-copy);
|
||||
}
|
||||
[data-rehype-pretty-code-figure]:hover .rehype-pretty-copy {
|
||||
[data-rehype-pretty-code-figure]:hover .rehype-pretty-copy,
|
||||
[data-rehype-pretty-code-figure] .rehype-pretty-copy:focus-visible,
|
||||
[data-rehype-pretty-code-figure] .rehype-pretty-copy:focus {
|
||||
opacity: 1;
|
||||
}
|
||||
[data-rehype-pretty-code-figure] .rehype-pretty-copy:hover {
|
||||
[data-rehype-pretty-code-figure] .rehype-pretty-copy:hover,
|
||||
[data-rehype-pretty-code-figure] .rehype-pretty-copy:focus-visible {
|
||||
@apply border-current;
|
||||
background-color: oklch(0.95 0 0 / 0.95);
|
||||
color: var(--color-code-copy-hover);
|
||||
}
|
||||
.dark [data-rehype-pretty-code-figure] .rehype-pretty-copy:hover {
|
||||
.dark [data-rehype-pretty-code-figure] .rehype-pretty-copy:hover,
|
||||
.dark [data-rehype-pretty-code-figure] .rehype-pretty-copy:focus-visible {
|
||||
background-color: oklch(0.15 0 0 / 0.95);
|
||||
}
|
||||
[data-rehype-pretty-code-figure] .rehype-pretty-copy.rehype-pretty-copied {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { LazyMotion, domAnimation, MotionConfig } from "motion/react";
|
||||
import { CodeCopyInit } from "@/components/ui/CodeCopyInit";
|
||||
|
||||
export function Providers({ children }: { children: React.ReactNode }) {
|
||||
return (
|
||||
@@ -9,6 +10,7 @@ export function Providers({ children }: { children: React.ReactNode }) {
|
||||
reducedMotion="user"
|
||||
transition={{ duration: 0.3, ease: [0.22, 1, 0.36, 1] }}
|
||||
>
|
||||
<CodeCopyInit />
|
||||
{children}
|
||||
</MotionConfig>
|
||||
</LazyMotion>
|
||||
|
||||
Reference in New Issue
Block a user