Files
supabase/apps/learn/styles/mdx.css
Danny White 8a26dbedd0 feat(apps): adopt inline code defaults in learn lite-studio and ui-library (#51985)
## Problem

Learn, lite-studio and UI library still use separate inline-code styles.

## Solution

Import the shared styles from #51980 in all three apps. Remove duplicate
styles from MDX renderers and component previews. All eight apps now
import the shared stylesheet, so #51986 can remove the old definitions.

## Review instructions

This PR changes only Learn, lite-studio and UI library.

1. Open [password-based auth in UI
library](https://ui-library-git-dnywh-depr-707-code-remaining-apps-supabase.vercel.app/library/docs/nextjs/password-based-auth).
Check inline code, highlighted examples and copy controls.

Learn and lite-studio have no deployment links in the Vercel PR comment;
check them locally or just code-review, since neither are yet public
facing (and are both designed to consume core styles).

| Before | After |
| --- | --- |
| <img width="1418" height="1728" alt="CleanShot 2026-10-20 at 16 45
37@2x"
src="https://github.com/user-attachments/assets/1cf25017-f5ee-410a-8bec-46ea61414b7b"
/> | <img width="1438" height="1742" alt="CleanShot 2026-10-20 at 16 55
58@2x"
src="https://github.com/user-attachments/assets/b4a5f11b-98fd-4209-ac93-f13d5e31703d"
/> |
2026-10-22 00:48:58 +00:00

85 lines
1.9 KiB
CSS

@reference './globals.css';
.dark [data-theme='light'] {
display: none;
}
.dark [data-theme='dark'] {
display: block;
}
[data-rehype-pretty-code-figure] {
@apply relative text-white;
}
[data-rehype-pretty-code-figure] code {
@apply font-mono text-sm grid min-w-full break-words rounded-none border-0 bg-transparent p-0;
counter-reset: line;
box-decoration-break: clone;
}
[data-rehype-pretty-code-figure] [data-line] {
@apply px-4 min-h-[1rem] py-0.5 w-full inline-block;
}
[data-rehype-pretty-code-figure] [data-line-numbers] [data-line] {
@apply px-2;
}
[data-rehype-pretty-code-figure] [data-line-numbers] > [data-line]::before {
@apply text-foreground-muted text-xs;
counter-increment: line;
content: counter(line);
display: inline-block;
width: 1.8rem;
margin-right: 1.4rem;
text-align: right;
}
[data-rehype-pretty-code-figure] .line--highlighted {
@apply relative bg-surface-200 dark:bg-surface-100;
}
[data-rehype-pretty-code-figure] .line--highlighted {
@apply border-foreground-muted border-l-2;
}
[data-rehype-pretty-code-figure] .line-highlighted span {
@apply relative;
}
/* reset <mark> default text color */
[data-rehype-pretty-code-figure] .word--highlighted {
@apply rounded-md bg-zinc-700/50 border-zinc-700/70 p-1 text-inherit;
}
.dark [data-rehype-pretty-code-figure] .word--highlighted {
@apply bg-zinc-900;
}
[data-rehype-pretty-code-title] {
@apply mt-2 pt-6 px-4 text-sm font-medium;
}
[data-rehype-pretty-code-title] + pre {
@apply mt-2;
}
.mdx > .steps:first-child > h3:first-child {
@apply mt-0;
}
.steps > h3 {
@apply mt-8 mb-4 text-base font-semibold;
}
/* .preview-grid-background {
position: absolute;
inset: 0;
height: 100%;
width: 100%;
background-image: linear-gradient(to right, #80808012 1px, transparent 1px),
linear-gradient(to bottom, #80808012 1px, transparent 1px);
background-size: 24px 24px;
} */