Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange block that hides top of the page in edit mode #47

Closed
januszj opened this issue Mar 3, 2022 · 5 comments
Closed

Strange block that hides top of the page in edit mode #47

januszj opened this issue Mar 3, 2022 · 5 comments

Comments

@januszj
Copy link

januszj commented Mar 3, 2022

Hi,

There is strange block that hides top of the page in edit mode:
image
Only visible with this theme.
When in preview mode it disapears.

@larsmew
Copy link

larsmew commented Mar 9, 2022

Hi,

I also experience the same issue when inserting a code block into a note. Otherwise, I haven't experienced this issue.
Skærmbillede 2022-03-10 kl  00 33 13

Skærmbillede 2022-03-10 kl  00 33 23

Would really love a fix for this!

@webbanthony
Copy link

I am also having this issue on Ubuntu 20.04

This is my favorite theme by far and I do a lot of coding so I would like this to be fixed as well!

@TibixDev
Copy link

I am also having the exact same issue, anyone any tips?

@PerryFinn
Copy link

I just ran into this problem too, maybe it's because I don't know how to write with this style of code block.
But I found the corresponding class to make it disappear by debugging tool .
First open the theme's css file and just comment out the following code.
You can use the shortcut Ctrl+F to find them.

.cm-s-obsidian pre.HyperMD-codeblock {
  color: var(--text-sub-accent);
}

.cm-s-obsidian div.HyperMD-codeblock-bg {
  background-color: #191621;
}

.cm-s-obsidian div.HyperMD-codeblock-begin-bg {
  border-top-left-radius: 0.3em;
  border-top-right-radius: 0.3em;
  border: none;
}

.cm-s-obsidian div.HyperMD-codeblock-begin-bg:before {
  position: absolute;
  content: '';
  top: -5%;
  left: 0;
  width: 100%;
  height: 60%;
  border-top-left-radius: 0.3em;
  border-top-right-radius: 0.3em;
  background-color: #191621;
} 

Of course if there is a way to do this without changing the source code, or if this is a bug, please let me know, thank you very much!

@frames75
Copy link

frames75 commented Mar 20, 2022

I just ran into this problem too, maybe it's because I don't know how to write with this style of code block. But I found the corresponding class to make it disappear by debugging tool . First open the theme's css file and just comment out the following code. You can use the shortcut Ctrl+F to find them.

.cm-s-obsidian pre.HyperMD-codeblock {
  color: var(--text-sub-accent);
}

.cm-s-obsidian div.HyperMD-codeblock-bg {
  background-color: #191621;
}

.cm-s-obsidian div.HyperMD-codeblock-begin-bg {
  border-top-left-radius: 0.3em;
  border-top-right-radius: 0.3em;
  border: none;
}

.cm-s-obsidian div.HyperMD-codeblock-begin-bg:before {
  position: absolute;
  content: '';
  top: -5%;
  left: 0;
  width: 100%;
  height: 60%;
  border-top-left-radius: 0.3em;
  border-top-right-radius: 0.3em;
  background-color: #191621;
} 

Of course if there is a way to do this without changing the source code, or if this is a bug, please let me know, thank you very much!

This works OK. However, by changing only next line works for me too (commented in this issue):

.cm-s-obsidian div.HyperMD-codeblock-begin-bg:before {
 - position: absolute;
 + position: relative;

msnr added a commit to msnr/Obsidian-Obsidianite that referenced this issue Apr 13, 2022
bennyxguo pushed a commit that referenced this issue Oct 9, 2022
### New Diamonds 💎

- Removed all the old `Cluster Free` code (please move to `live preview` mode)
- Added support for `live preview` mode [#44]
  - Supporting all the features that is there fore for live preview

### Fixes

- Problem with code block should no longer exist with `live preview` [#52]
- Images now align to left, fixed issue with image having no spaces between list items [#50][#34]
- Fixed issue with strange block that hides top of the page in edit mode with `live preview` [#47]
- Fixed bullet point not visible in view mode [#45]
- Fixed bullet lists in edit mode not compatible with different fonts [#32]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants