Giter Site home page Giter Site logo

Comments (3)

SignorMercurio avatar SignorMercurio commented on June 18, 2024 1

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):

Schermafbeelding 2022-05-26 om 15 48 51

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.

andredelft avatar andredelft commented on June 18, 2024 1

@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.

andredelft avatar andredelft commented on June 18, 2024

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):

Schermafbeelding 2022-05-26 om 15 48 51

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.