h16nning / typora-gitbook-theme

This is a Typora theme is inspired by gitbook.com. Most of the user interface has been overhauled. It contains three variants: two light variants and one dark theme.
GNU General Public License v3.0
307 stars 51 forks source link

The cursor of the first character in a list item is slightly higher #26

Open Jed-Z opened 3 years ago

Jed-Z commented 3 years ago

The problem exists in both ordered and unordered list. For example, when inserting an ordered list, type 1. followed by a space. Then an empty list is created, and it is found that the cursor is slightly higher than expected. It returns to normal after entering any character in the list.

Compare the height of the bottom of the cursor with the height of "1." in the following two pictures:

Snipaste_2021-06-18_19-15-56 Snipaste_2021-06-18_19-16-14

I found this problem on macOS. There is no such problem under Windows.

h16nning commented 3 years ago

Hi @Jed-Z, I am still searching a solution for this problem. As you might have noticed, this issue also appears for some other themes. As of right now it seems to be that the only way to modify the cursor's position with css is by modifying the line height. However, this would also change the distance between the lines.

A similar issue can be found when choosing the language of the coding language, as someone pointed out in #3. Unfortunately it is very hard to influence the cursors position with just css.