Skip to content

Commit 478f110

Browse files
fix(swingset): Mobile overflow (#8824)
1 parent ae353c6 commit 478f110

5 files changed

Lines changed: 6 additions & 4 deletions

File tree

.changeset/nine-streets-learn.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

packages/swingset/src/app/globals.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ body {
1212
/* Shiki css-variables theme — dark code block regardless of page light/dark mode */
1313
:root {
1414
--shiki-foreground: #e2e8f0;
15-
--shiki-background: #0d0d14;
15+
--shiki-background: oklch(0.205 0 0);
1616
--shiki-token-constant: #93c5fd;
1717
--shiki-token-string: #86efac;
1818
--shiki-token-comment: #64748b;

packages/swingset/src/components/CodeBlock.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export function CodeBlock({ children, className }: CodeBlockProps) {
6060
// safe: shiki output is developer-controlled source code
6161
<div
6262
dangerouslySetInnerHTML={{ __html: html }}
63-
className='[&>pre]:overflow-auto [&>pre]:bg-transparent [&>pre]:p-4'
63+
className='[&>pre]:bg-transparent! [&>pre]:overflow-auto [&>pre]:p-4'
6464
/>
6565
) : (
6666
<pre className='overflow-auto p-4 text-[var(--shiki-foreground)]'>

packages/swingset/src/components/DocsViewer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export function DocsViewer({ slug }: DocsViewerProps) {
3838
key={slug}
3939
meta={meta}
4040
>
41-
<article className='prose relative mx-auto max-w-3xl p-8'>
41+
<article className='prose relative mx-auto w-full min-w-0 max-w-3xl p-8'>
4242
{meta?.source ? (
4343
<div className='absolute right-8 top-8'>
4444
<ViewSource source={meta.source} />

packages/swingset/src/components/ui/sidebar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ function SidebarInset({ className, ...props }: React.ComponentProps<'main'>) {
289289
<main
290290
data-slot='sidebar-inset'
291291
className={cn(
292-
'bg-background relative flex w-full flex-1 flex-col md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm',
292+
'bg-background relative flex w-full min-w-0 flex-1 flex-col md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm',
293293
className,
294294
)}
295295
{...props}

0 commit comments

Comments
 (0)