bennyxguo / Obsidian-Obsidianite

🎨 Obsidian.md custom theme, it's dark and simple but yet still stays sparkles!
MIT License
271 stars 47 forks source link

Modification requests #104

Open markfaine opened 1 month ago

markfaine commented 1 month ago

I love this theme, it's the only one I ever want to use but I am no CSS expert but there are some things that are just not optimal in my opinion, for example, the header relative sizes are not correct, sometimes an H3 looks the same as an H2, it's very confusing, also the links are very distracting and have very thick lines, finally, if you put links in a unordered list on the rendered page you will get a new line after each list element item, like this:

image

Again, I'm just hacking at it with developer console like a blind man stumbling in the dark but here is as close as I can get to fixing those things:

/* Removes underlines on links */
.cm-s-obsidian .HyperMD-header-1,
.cm-s-obsidian .HyperMD-header-2,
.cm-s-obsidian .HyperMD-header-3 {
  font-size: 18px;
  line-height: 18px;
},
.cm-s-obsidian .HyperMD-header-4 {
  font-size: 12px;
  line-height: 12px;
}
.markdown-rendered .internal-link, .metadata-container .internal-link {
    cursor: var(--cursor-link);
    text-decoration-line: none;
    color: var(--link-color);
    transition: opacity .15s ease-in-out 0s;
}
.cm-s-obsidian span.cm-hmd-internal-link .cm-underline, .internal-link {
  background-image: none;
  transition: background 350ms ease-in-out;
}

/* Alread visited links are faded */
.cm-s-obsidian span.cm-link:not(.cm-formatting-link) .cm-underline, .external-link {
  background-image: none;
  color: var(--link-color);
  opacity: 50%;
} */

/* Fixes relative height of headers */
.markdown-rendered h2, .markdown-preview-view h2{
  font-size: 34px;
}
.markdown-rendered h2, .markdown-preview-view h2{
  font-size: 30px;
}
.markdown-rendered h3, .markdown-preview-view h3{
  font-size: 24px;
}
.markdown-rendered h4, .markdown-preview-view h4{
  font-size: 20px;
}
.markdown-rendered h5, .markdown-preview-view h5{
  font-size: 18px;
}
.markdown-rendered h6, .markdown-preview-view h6{
  font-size: 16px;
}

/* Fixes line break on lists that contain links */
.markdown-rendered ol > li, .markdown-rendered ul > li {

}
ul > li > div > svg.svg-icon, svg.right-triangle {
  display: none; 
}

I'm certain you could do a better job of addressing these issues but I understand if you disagree about the more subjective issues such as the link underlines. I can probably work around it if you don't want to change it.