crashmoney / obsidian-typewriter

Typewriter is an Obsidian theme designed for a focused writing experience.
GNU General Public License v3.0
93 stars 18 forks source link

[FEATURE REQUEST] Readable Code #44

Closed hoffination closed 6 months ago

hoffination commented 6 months ago

Describe your feature request

I love how this theme is sized and the general feel. It makes a delightful and legible experience that resonates with me, however, I'd like to see code sizes shrink slightly.

Proposed Solution

I add this CSS manually to my machine and perhaps it might be helpful for others seeking to do the same:

/* Set code to a smaller size*/
.cm-s-obsidian .HyperMD-codeblock {
    font-size: var(--font-smaller);
}

/* Set PDF code print size smaller */
@media print {
    pre > code {
        font-size: 10pt !important;
    }
}

Additional Context

Here is a screenshot of it working in conjunction with the Code Styler plugin:

Screenshot 2024-04-30 at 3 42 53 PM

crashmoney commented 6 months ago

Hey, thanks for filing a bug report!

This has been a pet peeve of mine for some time. As I've mentioned in other issues, I'm unfortunately lacking spare time to tackle this. I'll be sure to resolve this and #43 in the next update :)

crashmoney commented 6 months ago

The theme has a --code-size variable, which I've edited from --font-normal to --font-small as I find --font-smaller to be a bit hard to read. In my testing this carried over to PDF export as well 👍🏻