adityatelange / adityatelange/hugo-PaperMod
[Bug]: code blocks in lists with negative margin
- Dominant language
- HTML
- Stars
- 13.9k
- Forks
- 3.4k
- PR merge metrics
- No merged PRs in 30d
Description
### What happened?
Code blocks within unnumbered list items (not within numbered list items) show a negative margin: they not only do not respect the list indentation, they also rendered are left of the regular text outside of the list.
culprit seems to be https://github.com/adityatelange/hugo-PaperMod/blob/d3768854d00ad003b0a8dbdba254ce9224377a01/assets/css/common/md-content.css#L122. A similar problem was addressed in https://github.com/adityatelange/hugo-PaperMod/pull/154, but did not touch this line.
I am unsure how to fix this, but removing the whole block
```
.md-content ul pre {
margin-inline-start: calc(var(--gap) * -2);
}
```
fixes the problem for me.
### Steps to reproduce
render
````
regular text
- list item 1
- list item 2
some more text
```
Some code
```
````
This, in papermod, sets a negative margin for the text block, while in fact it should be positive (and match the one of the rest of the item text).
### Hugo Version
Hugo >= 0.146.0 (Recommended - Minimum version required for PaperMod)
### PaperMod Version
master (d3768854d00ad003b0a8dbdba254ce9224377a01)
### What kind of devices are you seeing the problem on?
Desktop
### What browsers are you seeing the problem on?
Firefox
### Browser Version
_No response_
### Relevant log output
```shell
none
```
### Repository/Source Code link where this issue can be reproduced
_No response_
### Code of Conduct
- [x] I agree to follow this project's Code of Conduct
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.