1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-05 18:17:19 +00:00

Fix margin issue in markup paragraph rendering (#34599) (#34606)

Backport #34599 by @silverwind

The Fomantic-inherited `p:last-child` rule in base.css interferes with
this markdown rendering:

```
1. a

2. a
```

Before (unequal margin):
<img width="143" alt="Screenshot 2025-06-04 at 14 09 07"
src="https://github.com/user-attachments/assets/6d6ba5e0-0d84-42e0-a0e4-9e93a59c4d65"
/>

After (rendering matches GitHub):
<img width="181" alt="Screenshot 2025-06-04 at 14 09 14"
src="https://github.com/user-attachments/assets/bb81e14e-bc9f-4d52-92d0-f7a17c63070e"
/>

Co-authored-by: silverwind <me@silverwind.io>
This commit is contained in:
Giteabot
2025-06-05 13:48:07 +08:00
committed by GitHub
parent e18eae7129
commit fac434da0a

View File

@ -134,6 +134,11 @@
margin-bottom: 16px; margin-bottom: 16px;
} }
/* override p:last-child from base.css */
.markup p:last-child {
margin-bottom: 16px;
}
.markup hr { .markup hr {
height: 4px; height: 4px;
padding: 0; padding: 0;