# CSS snippet can color bold / italic everywhere except links

**URL:** <https://forum.obsidian.md/t/css-snippet-can-color-bold-italic-everywhere-except-links/107260>\
**Category:** Devs: Theme Design & Custom CSS\
**Tags:** backlinks, custom-css, internal-links, mobile\
**Created:** [October 26, 2025, 1:28am UTC](https://forum.obsidian.md/t/css-snippet-can-color-bold-italic-everywhere-except-links/107260 "2025-10-26T01:28:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Avenger](https://forum.obsidian.md/letter_avatar_proxy/v4/letter/a/9de0a6/32.png) [@Avenger](https://forum.obsidian.md/u/Avenger)\
**Post date:** [October 26, 2025, 1:28am UTC](https://forum.obsidian.md/t/css-snippet-can-color-bold-italic-everywhere-except-links/107260/1 "2025-10-26T01:28:47Z")

</div>

### What I’m trying to do

I want a CSS snippet for Obsidian Mobile (Android) that controls the colour of any **bold** , _italic_, _ **bold+italic** _ text that has those stylings.

I want to be able to control the colour no matter whether it’s a heading, raw text, internal or external URL link, or in a callout, etc.

For instance I want all my italic text to be soft blue, bold to be orange, and bold+italic to be yellow by default.

### The problem

Internal back links like **[[this bold one]]** and _[This italic one](https://help.obsidian.md/links)_ don’t change colour. They remain my accent colour, I’m also not using a custom theme or any CSS snippets controlling anything to do with links or fonts.

> Normal text works perfectly in reading and editing modes with the CSS I have tried, but again… links just remain as my accent colour, they never work in reading mode.

### Things I have tried

Terms: CSS snippet emphasis custom color change bold colour italic android mobile default

I have searched on the forum, Reddit, Google. I have tried using JavaScript via Templater instead (to no avail) although I’d much rather use CSS.

Tried to use ChatGPT, Claude and deepseek to vibe code for me but still nothing worked properly for links.

---

<div class="post-metadata">

**Author:** ![dawni](https://forum.obsidian.md/user_avatar/forum.obsidian.md/dawni/32/79261_2.png) [@dawni](https://forum.obsidian.md/u/dawni)\
**Post date:** [October 26, 2025, 3:44am UTC](https://forum.obsidian.md/t/css-snippet-can-color-bold-italic-everywhere-except-links/107260/2 "2025-10-26T03:44:03Z")

</div>

Here are the emphasis types that came to mind.

You can set them all the same:

 ![yellow emphasis everywhere](https://forum.obsidian.md/uploads/default/original/3X/8/e/8e6e47245f641af14eb49a4ff880fb64ed3b0060.png)

… or go wild:

 ![wild emphasis colors](https://forum.obsidian.md/uploads/default/original/3X/6/a/6ab6cc64c9bc7fd5837613fce45369e7c924d3ff.png)

> **wild emphasis colors CSS**
>
> ```css
> body {
> --bold-color: green;
> --italic-color: orange;
> }
> 
> strong a,
> .cm-strong.cm-hmd-internal-link {
> --link-color: yellow;
> --link-unresolved-color: yellow;
> }
> 
> .cm-link.cm-strong {
> --link-external-color: yellow;
> }
> 
> em a,
> .cm-em.cm-hmd-internal-link {
> --link-color: skyblue;
> }
> 
> strong em a {
> --link-unresolved-color: brown;
> }
> 
> .cm-em.cm-hmd-internal-link.cm-strong {
> --link-color: brown;
> }
> 
> .cm-em.cm-link {
> --link-external-color: skyblue;
> }
> 
> em a,
> .cm-em.cm-hmd-internal-link {
> --link-unresolved-color: red;
> }
> 
> ```

For any instances I missed, you could press Ctrl + Shift + I / Cmd + Opt + I in Obsidian to look for the selectors (like the ones below) to add those to your CSS snippet.

```css
body {
	--bold-color: yellow;
	--italic-color: yellow;
}

strong a,
.cm-strong.cm-hmd-internal-link {
	--link-color: yellow;
	--link-unresolved-color: yellow;
}

.cm-link.cm-strong {
	--link-external-color: yellow;
}

em a,
.cm-em.cm-hmd-internal-link {
	--link-color: yellow;
}

strong em a {
	--link-unresolved-color: yellow;
}

.cm-em.cm-hmd-internal-link.cm-strong {
	--link-color: yellow;
}

.cm-em.cm-link {
	--link-external-color: yellow;
}

em a,
.cm-em.cm-hmd-internal-link {
	--link-unresolved-color: yellow;
}

```

---

<div class="post-metadata">

**Author:** ![system](https://forum.obsidian.md/uploads/default/original/3X/b/e/bec35fbd23ab28909bb6bfe62cb32eb82dd34019.png) [@system](https://forum.obsidian.md/u/system)\
**Post date:** [January 24, 2026, 3:44am UTC](https://forum.obsidian.md/t/css-snippet-can-color-bold-italic-everywhere-except-links/107260/3 "2026-01-24T03:44:39Z")

</div>

Closed on January 24, 2026, 3:44am UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
