Skip to content

Commit 5084049

Browse files
authored
fix: add explicit styling for markdown strong and em elements (anomalyco#806)
Tailwind CSS v4 sets `font-weight: bolder` for <strong> by default, which is a relative value that may not produce visible bold effect depending on the parent element's font weight. This commit adds explicit Tailwind utility classes to ensure: - <strong> elements render with font-semibold (font-weight: 600) - <em> elements render with italic style Fixes anomalyco#802
1 parent 77d2f1c commit 5084049

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎packages/app/src/app/components/part-view.tsx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -907,6 +907,8 @@ export default function PartView(props: Props) {
907907
textContainerEl = el;
908908
}}
909909
class={`markdown-content max-w-none ${textClass()}
910+
[&_strong]:font-semibold
911+
[&_em]:italic
910912
[&_h1]:text-2xl [&_h1]:font-bold [&_h1]:my-4
911913
[&_h2]:text-xl [&_h2]:font-bold [&_h2]:my-3
912914
[&_h3]:text-lg [&_h3]:font-bold [&_h3]:my-2

0 commit comments

Comments
 (0)