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

Inline Code Readability and Enhancement #129

Open
xidsyed opened this issue Aug 1, 2022 · 1 comment
Open

Inline Code Readability and Enhancement #129

xidsyed opened this issue Aug 1, 2022 · 1 comment

Comments

@xidsyed
Copy link

xidsyed commented Aug 1, 2022

Thanks for making the best obsidian theme ever btw, and on top of that continuing support for it! Big Ups for that!!
The theme has been pretty much perfect for me and i havent had to use any of css snippets on top except for one thing, the inline code.

image

You see inline code for me is generally a way to highlight and differentiate code from surrounding text, usually this is necessary, since code is much harder to process (mentally), than just plain English, thats why syntax highlighting helps so much in full blown code blocks!!

But when it comes to inline codes, whats least expected is that it have a monospace font, and be more or atleast equally readable than the text surrounding it. I wanna look at a text, and immediately find where all the code references are, ,but unfortunately in the theme, the contrast is greatly reduced, due to the background highlight around the code snippet so it blends in a lot more

image

see what i mean? Even on github, if i were to use a code snippet , i can clearly differentiate it from the rest of the text. Keep in mind the above is a zoomed in ss, and is still harder to make out.

So for now i simply change the color to a LightBlue

:root {
	/*--color-monospace: LightBlue;*/
}

.markdown-preview-view code,
.markdown-source-view.mod-cm6.cm-s-obsidian span.cm-inline-code
{
	color: var(--color-monospace);
}

It works fine mostly, ,except when im exporting to pdf, which only supports light mode, where it backfires 🤣. Would be nice if the readability was better natively.

@xidsyed
Copy link
Author

xidsyed commented Aug 1, 2022

/*scroll codeblock in read mode*/
.markdown-reading-view code[class*="language-"] {
    overflow-x: scroll;
    white-space: pre;
}

Also i found this snippet that allows codeblocks to be scrollable in read view!

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

1 participant