Comments (3)
Hi @SignorMercurio,
Great catch, thanks for sharing. If you look closely in the editor, you can see that all the tens digit exceeds the list container in the Typora editor, as illustrated below (using the inspector):
![]()
I believe this is the reason that it is cut off from the PDF export (though I do not know its inner workings).
Unfortunately, I cannot do anything about this: the list counters exceeding the list container is expected behaviour, which you can replicate by making long lists in the Tailwind workspace. And also note that it happens in other themes as well, though most of the time you have to go further than 10 items: try making a 1000 item list in the GitHub theme, you'll find the same issue in the PDF export!
Since it is a Typora issue, you could try submitting an issue here: https://github.com/typora/typora-issues. And for a work-around, increasing the
padding-left
seems an excellent idea to me. If you want to make sure you're not targeting nested lists, you can use this selector in your custom CSS:#write > ol { padding-left: 2em; }
Thanks for the detailed reply, very helpful to me!
from typora-tailwind-theme.
@SignorMercurio just thought of another solution that might be interesting for you. You can also use list-style-position
to solve your problem:
ol {
list-style-position: inside;
}
See also the MDN docs. You can use this in combination with padding-left: 0
to properly align the items to the left.
I think it has other layout drawbacks which I don't really like, but it at least guarantees that everything will be contained in the list container!
from typora-tailwind-theme.
Hi @SignorMercurio,
Great catch, thanks for sharing. If you look closely in the editor, you can see that the tens digit exceeds the list container in the Typora editor, as illustrated below (using the inspector):
I believe this is the reason that it is cut off from the PDF export (though I do not know its inner workings).
Unfortunately, I cannot do anything about this: the list counters exceeding the list container is expected behaviour, which you can replicate by making long lists in the Tailwind workspace. And also note that it happens in other themes as well, though most of the time you have to go further than 10 items: try making a 1000 item list in the GitHub theme, you'll find the same issue in the PDF export!
Since it is a Typora issue, you could try submitting an issue here: https://github.com/typora/typora-issues. And for a work-around, increasing the padding-left
seems an excellent idea to me. If you want to make sure you're not targeting nested lists, you can use this selector in your custom CSS:
#write > ol {
padding-left: 2em;
}
from typora-tailwind-theme.
Related Issues (11)
- Format codeblocks correctly
- How to change the background color of the selected text? HOT 1
- Go through Typora-specific styles
- Style footnotes
- Style meta block
- Style source code mode
- Missing folder from the .zip file? HOT 3
- 😍 awesome!!!!! HOT 1
- Word wrap not working inside code block HOT 3
- Suggestion: Improve padding and styling on input box HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from typora-tailwind-theme.