abricotine icon indicating copy to clipboard operation
abricotine copied to clipboard

Adding padding or margin to headlines

Open ghost opened this issue 7 years ago • 3 comments

I tried to add a padding or margin (top and/or bottom) to headlines in my theme, but could not find a way to do so. I think with the current structure this is not possible (related to #169). Right or wrong?

ghost avatar Mar 30 '17 14:03 ghost

Right now, the only way to do this is to trick with the line-height property, so you can simulate a margin top AND bottom. Other properties such as margin and padding are not supported due to the way CodeMirror renders lines. Fixing this would require an extra js treatment to add a class to lines which contains headings and I'm afraid this could impact performance...

brrd avatar Mar 30 '17 14:03 brrd

I just tried it. line-height will do its job, but will mess up the caret position. You will see the caret at a position where it isn't. I saw the caret above a headline and actually wrote below the headline...

ghost avatar Mar 30 '17 14:03 ghost

Fixing this would require an extra js treatment to add a class to lines which contains headings and I'm afraid this could impact performance...

In case you add additional classes, quotes > should also get an extra class to allow advanced styling of quotes.

ghost avatar Apr 02 '17 20:04 ghost