noatpad / typora-theme-ursine

A Typora theme, inspired by Bear
MIT License
715 stars 86 forks source link

Shortcut Headline problem #56

Closed Qrizzz closed 4 years ago

Qrizzz commented 4 years ago

I use the shortcuts + 16 to create a headline. When I do this before entering text the Ursine theme somehow moves the hashtags for the headline a line below or above the cursor input.

It’s hard to explain. Here are some screenshots before hitting the shortcut and after (left side normal view, right side source code view).

before after

I have no clue why this is happening or if it’s just me. Other themes seem to have no problem.

Konfido commented 4 years ago

Same here.

noatpad commented 4 years ago

(Pardon the late reply, college semester got real busy this time around)

But it's also happening on my end, but I honestly have no idea what might be causing it. It's definitely the theme, because every other theme works fine with me. How odd that a stylesheet is causing this...

Qrizzz commented 4 years ago

I think it is due to the position: absolute in h1::before (Line 423)

I had a look at some other Themes that outdent the headline information. They use ::before pseudo-element and negative margin. I managed to change it in the the generated css for myself. I am sure you had something in mind with the absolute position and I don’t know for sure if my “solution” does not break anything else.

noatpad commented 4 years ago

Yeah, it was that! I think back then I had an unorthodox way of styling that part, which is why I used ::after; but I forgot about it afterwards. Konfido's PR was enough to fix things and it'll be up in the next release once I get things together