jbt/markdown-editor

Left spacing of the first line in the code blocks is different than other lines

scriptype opened this issue · 0 comments

I'm talking about this:

image

First line has a little more space on the left side. With inspector, I can see it's because an inline element (code) is used to wrap the text inside the block. And it has 3px padding-left, which only applies to the first line, since it's an inline element.

image

A possible solution would be to give display: block or display: inline-block to the code. But I guess using code elements for code blocks is against its intended semantics, be it fixed with my solution or not.