Fix width of pre element

This commit is contained in:
2025-09-20 20:55:21 +02:00
parent 52b49e18a2
commit 20038e290a
2 changed files with 11 additions and 1 deletions

View File

@@ -901,7 +901,7 @@ export const toHtml = (markdown: string, assetDirectory: string): string => {
// .filter((s) => !(s instanceof JustALineBreak)) // .filter((s) => !(s instanceof JustALineBreak))
.map((s) => s.render()) .map((s) => s.render())
.join(""); .join("");
return `<div>${html}</div>`; return `<div class="content">${html}</div>`;
}; };
/** /**

View File

@@ -23,12 +23,16 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
flex: 1;
} }
pre { pre {
box-sizing: border-box; box-sizing: border-box;
border: 1px solid #00FFFF; border: 1px solid #00FFFF;
padding: 1rem; padding: 1rem;
width: fit-content;
max-width: 100%;
white-space: normal;
} }
img { img {
@@ -121,6 +125,12 @@
a { a {
color: #00FFFF; color: #00FFFF;
} }
.content {
display: flex;
flex-direction: column;
flex: 1;
}
</style> </style>
</head> </head>