feat: use tailwindcss-typography as markdown styling

This commit is contained in:
Jiang Feng
2025-04-27 14:19:45 +08:00
parent 741e2f0e62
commit 906df61d81
9 changed files with 140 additions and 220 deletions

View File

@@ -201,94 +201,6 @@ textarea {
outline: none;
}
.markdown {
line-height: 1.75;
a {
text-decoration: underline;
text-decoration-style: dotted;
text-underline-position: from-font;
text-decoration-color: var(--muted-foreground);
&:hover {
text-decoration: underline;
}
}
h1 {
@apply text-2xl font-bold;
margin-top: 0.5rem;
margin-bottom: 0.5rem;
}
h2 {
@apply text-xl font-bold;
margin-top: 0.5rem;
margin-bottom: 0.5rem;
}
h3 {
@apply text-lg font-bold;
margin-top: 0.5rem;
margin-bottom: 0.5rem;
}
h4 {
@apply text-base font-bold;
margin-bottom: 0.5rem;
}
h5 {
@apply text-sm font-bold;
}
h6 {
@apply text-xs font-bold;
}
ul {
@apply list-disc pl-4;
}
ol {
@apply list-decimal pl-4;
}
img {
display: block;
max-width: 100%;
margin: 0 auto;
}
table {
@apply w-full;
table-layout: fixed;
border-collapse: collapse;
th,
td {
padding: 4px 8px;
border: 1px solid var(--border);
}
th {
@apply bg-muted;
}
}
code:not([class*="language-"]) {
@apply bg-muted;
@apply rounded-md;
@apply px-1;
@apply py-0.5;
@apply border;
}
blockquote {
@apply border-muted-foreground text-muted-foreground border-l-2 pl-2;
}
}
@layer base {
* {
@apply border-border outline-ring/50;

View File

@@ -1,7 +1,6 @@
@import "./globals.css";
.ProseMirror {
@apply p-12 px-8 sm:px-12;
}
.ProseMirror .is-editor-empty:first-child::before {