After upgrading to 1.11.4, the margin-left handling logic for lists underwent a breaking change
-
[x] Searched existing issues to avoid creating duplicates.
-
[x] Confirmed that it can be reproduced in built-in themes without customized css.
If it only exists in 3rd party themes or css, you can still report it, but please attach the theme target or the css file. We may not "fix" it, if it is caused by 3rd party themes or css styles that we cannot support.
-
[x] Searched http://support.typora.io/
I use the Han theme and its variants from the official CSS Gallery as the foundation for my daily writing.
After upgrading Typora to version 1.11.4, I noticed that while lists render correctly in the editor, they appear abnormal when exported to HTML and PDF.
This issue does not occur in the older version of Typora, 1.10.8.
A minimal test set is as follows: markdown:
- Level 1
- Level 2
- Level 3
Paragraph texts here. Paragraph texts here. Paragraph texts here. Paragraph texts here. Paragraph texts here. Paragraph texts here. Paragraph texts here. Paragraph texts here. Paragraph texts here. Paragraph texts here. Paragraph texts here. Paragraph texts here. Paragraph texts here.
The CSS file is located here: https://theme.typora.io/theme/Han/
In 1.11.4, the lists are rendered as expected and shown below.
After exporting to HTML, significant offset occurred, as shown below.
Same offset shown in the exported pdf.
But the margin-left in exported pdf is not changed in 1.10.8, as shown below.
I'm not familiar with advanced CSS debugging, so I'm raising this issue in this repository and asking for your help. Thanks!
I found that an extra rule of css is added to the exported html, but i can't explain why this rule would not effect the other official typora themes.
<style type='text/css' id="style-lp">ol, ul {padding-left: 40px}</style>
In the version 1.12.4, this issue is still unfixed. If you are also annoyed by the small problem, I find this dirty fix as belew, at lease it works for me, and hope it will be helpful.
The extra padding insertion is located at Typora/resources/appsrc/window/frame.js.
Just open it with text editor, and find {padding-left: 40px} and change 40px to 0px.
Save and exit.