Skip to content

Commit f2e79cf

Browse files
committed
Fix stacked code examples in dark mode
1 parent 3406ca0 commit f2e79cf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/components/code-example.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ export async function CodeExample({
5757

5858
export function CodeExampleWrapper({ className, children }: { className?: string; children: React.ReactNode }) {
5959
return (
60-
<div className="rounded-xl bg-gray-950 in-data-stack:mt-0 in-data-stack:rounded-none in-[figure]:-mx-1 in-[figure]:-mb-1 in-data-stack:[:first-child>&]:rounded-t-xl in-data-stack:[:last-child>&]:rounded-b-xl">
60+
<div className="rounded-xl bg-gray-950 in-data-stack:mt-0 in-data-stack:rounded-none in-[figure]:-mx-1 in-[figure]:-mb-1 in-data-stack:[:first-child>&]:rounded-t-xl in-data-stack:[:first-child>&]:*:rounded-t-xl in-data-stack:[:last-child>&]:rounded-b-xl in-data-stack:[:last-child>&]:*:rounded-b-xl">
6161
<div
6262
className={clsx(
63-
"rounded-xl p-1 text-sm scheme-dark in-data-stack:not-first:rounded-t-none dark:bg-white/5 dark:inset-ring dark:inset-ring-white/10",
63+
"p-1 text-sm scheme-dark dark:bg-white/5 dark:inset-ring dark:inset-ring-white/10 in-data-stack:dark:inset-ring-0",
6464
className,
6565
)}
6666
>
@@ -73,7 +73,7 @@ export function CodeExampleWrapper({ className, children }: { className?: string
7373
export function CodeExampleStack({ children }: { children: React.ReactNode }) {
7474
return (
7575
<div data-stack>
76-
<div className="not-prose">{children}</div>
76+
<div className="not-prose rounded-xl dark:outline dark:-outline-offset-1 dark:outline-white/10">{children}</div>
7777
</div>
7878
);
7979
}

0 commit comments

Comments
 (0)