diff --git a/assets/css/main.css b/assets/css/main.css index fea4f24c..cbaa84a9 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -165,6 +165,12 @@ ul li { text-indent: -2ch; } +/* Keep bullet and first line together when Markdown renders loose lists (
  • ...

  • ). */ +ul li > p:first-child { + display: inline; + margin: 0; +} + ul > li::before { content: '* '; font-weight: bold; diff --git a/exampleSite/content/posts/loose-list-rendering.md b/exampleSite/content/posts/loose-list-rendering.md new file mode 100644 index 00000000..57eedf5a --- /dev/null +++ b/exampleSite/content/posts/loose-list-rendering.md @@ -0,0 +1,19 @@ +--- +title: "Loose vs Tight List Rendering" +date: 2026-02-15T16:56:19+09:00 +description: "Minimal reproduction for list rendering where list items are wrapped in paragraph tags." +tags: [css, markdown] +--- + +This page demonstrates the visual difference between tight and loose lists in Markdown. + +## Tight list + +- First item +- Second item + +## Loose list + +- First item + +- Second item