bennyxguo / Obsidian-Obsidianite

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

Text isn't properly formatted in certain situations #7

Open reallyely opened 3 years ago

reallyely commented 3 years ago

Great theme! Thanks for your hard work.

Windows 10, Obsidian 0.9.11, Obsidianite (Dark and Light Mode)

Two Issues I've run into so far

image When a link is also bold, the text clipping appears to be unset.

image Italicized text is forced to Operator Mono, but should fall back to Rubik as it's the free and recommended default font on your readme.

bennyxguo commented 3 years ago

@reallyely The first issue bold formatting with links, I am still trying to find a way to fix that one. So it will be fixed sooner or later. For now try to not use bold formatting for links yet.

For the second issue, I will fix that in 1.1.1, what you suggests makes perfect sense. Thanks for reporting!

zcysxy commented 3 years ago

@bennyxguo I think I fixed this using :not() pseudo-class.

.cm-strong:not(.cm-hmd-barelink):not(.cm-hmd-internal-link):not(.cm-highlight),
strong {
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  padding: 0 0.1rem;
  color: #7aa2f7;
  background-color: #7aa2f7;
  background-image: linear-gradient(62deg, #87c2fd 0%, #dcb9fc 100%) !important;
}

I just exclude [], wikilinks and highlight for now, maybe there are some other inline formats should be excluded.

iacore commented 2 years ago

Still reproduced on Linux.

empressabyss commented 5 months ago

I'm super new to CSS but believe I found a fix for bold link issues! The exact issue I had was that if links were also bold, their text would not be rendered until hovered over.

In .../vaultname/.obsidian/themes/Obsidianite/theme.css (for me, on Linux), find the following section (line 757), and comment out the color: and position: lines:

a,
.internal-link,
.cm-hmd-internal-link,
.cm-link {
  text-decoration: none !important;

  /* color: var(--text-normal); */ 
  /* position: relative; */

  z-index: 1;
}

Bold links now display bold text styling correctly and still have their thick underline that grows and shrinks, and the text colour becomes white when hovered over.

@iacore I'm running the native version of Obsidian on Garuda Linux, and this worked for me!

Hope this helps someone!! 💜

iacore commented 5 months ago

@empressabyss you can send a PR with the changes if you want.