Skip to content

Commit e6c25ff

Browse files
committed
docs: harmonize pre and a tags for mdx
1 parent 3f65b2f commit e6c25ff

File tree

3 files changed

+23
-22
lines changed

3 files changed

+23
-22
lines changed

apps/website/src/components/mdx-components/index.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,20 @@ export const components: Record<string, Component> = {
7575
</h5>
7676
);
7777
}),
78+
a: component$<PropsOf<'a'>>(({ ...props }) => {
79+
return (
80+
<a
81+
{...props}
82+
class={[
83+
cn('font-semibold underline underline-offset-4 hover:opacity-90', props.class),
84+
]}
85+
target="_blank"
86+
rel="noreferrer"
87+
>
88+
<Slot />
89+
</a>
90+
);
91+
}),
7892
blockquote: component$(() => {
7993
return (
8094
<Note>

apps/website/src/global.css

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1221,7 +1221,15 @@
12211221
@apply border-border;
12221222
}
12231223
body {
1224-
@apply bg-background text-foreground;
1224+
@apply bg-background font-sans text-foreground;
1225+
}
1226+
1227+
p code {
1228+
@apply rounded-sm border-b-2 bg-accent px-2 py-0.5;
1229+
}
1230+
1231+
pre code {
1232+
@apply whitespace-pre-wrap;
12251233
}
12261234

12271235
*::-webkit-scrollbar {

apps/website/src/routes/docs.css

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)