jarodise / Dracula-for-Obsidian.md

A dark theme for Obsidian.md
MIT License
157 stars 46 forks source link

code blocks indent going backwards #6

Closed mguidoti closed 3 years ago

mguidoti commented 3 years ago

If you're reporting an UI issue, make sure you take a screenshot that shows the actual bug. image

When I hit tab at the beginning one a line, it goes backwards.

I'm trying to figure this out on the .css, but couldn't find a solution up to this moment.

Could you guys try to help me out with this one?

Thanks in advance,

mguidoti commented 3 years ago

Fixed.

I added text-indent: 0px !important; into the following block and it seems to have it solved for me.

 /* Editor CodeBlock TEXT Appearance */
.cm-s-obsidian pre.HyperMD-codeblock {
  font-family: monaco !important;
  font-size: var(--font-size-code) !important;
  padding: 1px !important;
  display: block;
  color: var(--code-block) !important;
  font-weight: 500;
}

image

Sorry for posting before looking more in-depth for a solution myself. Oh, I think you noticed but I also changed the font-family to Fira Code (personal preference). On my version of it I also changed the nominal font in the font-family property to the variable var(--font-family-editor) in both Editor CodeBlock and Preview CodeBlock Text Appearance.

Cheers and thanks for putting this together ; )

jarodise commented 3 years ago

Fixed.

I added text-indent: 0px !important; into the following block and it seems to have it solved for me.

 /* Editor CodeBlock TEXT Appearance */
.cm-s-obsidian pre.HyperMD-codeblock {
  font-family: monaco !important;
  font-size: var(--font-size-code) !important;
  padding: 1px !important;
  display: block;
  color: var(--code-block) !important;
  font-weight: 500;
}

image

Sorry for posting before looking more in-depth for a solution myself. Oh, I think you noticed but I also changed the font-family to Fira Code (personal preference). On my version of it I also changed the nominal font in the font-family property to the variable var(--font-family-editor) in both Editor CodeBlock and Preview CodeBlock Text Appearance.

Cheers and thanks for putting this together ; )

Thank you for spotting the issue and also coming up with a solution, I've already pushed an update with your solution.