Skip to content

Commit fa43f19

Browse files
committed
allow break logn paths on parragraph
1 parent cd84e53 commit fa43f19

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/pages/[...lang]/posts/[...slug].astro

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ if (!images[post.data.image!]) throw new Error(`"${post.data.image}" does not ex
119119
<div class="divider"></div>
120120
<div class="grid grid-row-2 md:gap-x-12 grid-cols-1 md:grid-cols-12 lg:grid-cols-10">
121121
<section
122-
class="article-content mb-8 prose-pre:max-w-[85vw] md:prose-pre:max-w-none prose prose-p:mb-6 prose-h2:mb-5 prose-h2:mt-10 prose-h3:mb-3 prose-h3:mt-5 col-span-1 md:col-span-8 lg:col-span-7 text-lg"
122+
class="article-content mb-8 prose-pre:max-w-[85vw] md:prose-pre:max-w-none prose prose-p:mb-6 prose-h2:mb-5 prose-h2:mt-10 prose-h3:mb-3 prose-h3:mt-5 col-span-1 md:col-span-8 lg:col-span-7 text-lg
123+
[&_p]:my-[24px] [&_p>code]:whitespace-pre-wrap [&_p>code]:break-all [&_p>code]:break-words"
123124
>
124125
<Content components={{ Code, InfoNote, AuthorNote }} />
125126
<BottomTags tags={post.data.tags} />
@@ -133,8 +134,3 @@ if (!images[post.data.image!]) throw new Error(`"${post.data.image}" does not ex
133134
</div>
134135
</article>
135136
</Layout>
136-
<style>
137-
#post-content p {
138-
margin: 24px !important;
139-
}
140-
</style>

0 commit comments

Comments
 (0)