feed: render poem fenced blocks as verse, not code

This commit is contained in:
blog-dev
2026-09-20 19:18:11 +00:00
parent 589a745c5b
commit d244a34fc9
2 changed files with 40 additions and 17 deletions
+16
View File
@@ -118,6 +118,22 @@ const StyledContent = styled.div`
line-height: 2em;
font-family: Monaco, 'Andale Mono', 'Courier New', Courier, monospace;
}
/* A fenced block tagged with the 'poem' language is verse, not code: drop
the code chrome and set it in the serif face, keeping the author's line
breaks and blank lines (which read as stanza breaks). */
pre:has(> code.language-poem) {
background-image: none;
border: none;
padding: 0;
margin: 1.8rem 0;
line-height: 1.75;
}
pre > code.language-poem {
font-family: Georgia, 'Times New Roman', serif;
font-size: 1.05rem;
color: #222222;
white-space: pre-wrap;
}
`
interface PostProps {