# Editing Portal style with Code Injection

**URL:** <https://forum.ghost.org/t/editing-portal-style-with-code-injection/35671>\
**Category:** Themes\
**Created:** [January 19, 2023, 6:09pm UTC](https://forum.ghost.org/t/editing-portal-style-with-code-injection/35671 "2023-01-19T18:09:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dreamburger](https://avatars.discourse-cdn.com/v4/letter/d/f4b2a3/32.png) [@dreamburger](https://forum.ghost.org/u/dreamburger)\
**Post date:** [January 19, 2023, 6:09pm UTC](https://forum.ghost.org/t/editing-portal-style-with-code-injection/35671/1 "2023-01-19T18:09:38Z")

</div>

Hi,

I’m using the Casper theme.

So far I’ve been able to tweak some basic style settings with Code Injection.

Unfortunately I didn’t manage to change simple style settings such as background color for the Portal pop-up.

Is it possible to do this via Code Injection ? I’m using a dark theme and the white pop-up is not ideal.

Thanks for your help.

---

<div class="post-metadata">

**Author:** ![dreamburger](https://avatars.discourse-cdn.com/v4/letter/d/f4b2a3/32.png) [@dreamburger](https://forum.ghost.org/u/dreamburger)\
**Post date:** [January 24, 2023, 11:55am UTC](https://forum.ghost.org/t/editing-portal-style-with-code-injection/35671/2 "2023-01-24T11:55:05Z")

</div>

I assume it’s not possible?

---

<div class="post-metadata">

**Author:** ![Cathy\_Sarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/cathy_sarisky/32/25750_2.png) [@Cathy\_Sarisky](https://forum.ghost.org/u/Cathy_Sarisky)\
**Post date:** [January 24, 2023, 1:39pm UTC](https://forum.ghost.org/t/editing-portal-style-with-code-injection/35671/3 "2023-01-24T13:39:05Z")

</div>

If you’re self hosting, it’s possible. If you’re on Ghost Pro, it’s not currently.

---

<div class="post-metadata">

**Author:** ![dreamburger](https://avatars.discourse-cdn.com/v4/letter/d/f4b2a3/32.png) [@dreamburger](https://forum.ghost.org/u/dreamburger)\
**Post date:** [January 24, 2023, 3:02pm UTC](https://forum.ghost.org/t/editing-portal-style-with-code-injection/35671/4 "2023-01-24T15:02:03Z")

</div>

I’m self-hosting, is there any documentation available?

---

<div class="post-metadata">

**Author:** ![Cathy\_Sarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/cathy_sarisky/32/25750_2.png) [@Cathy\_Sarisky](https://forum.ghost.org/u/Cathy_Sarisky)\
**Post date:** [January 24, 2023, 3:42pm UTC](https://forum.ghost.org/t/editing-portal-style-with-code-injection/35671/5 "2023-01-24T15:42:44Z")

</div>

Not a full tutorial, but some notes from when I did something similar:

> **[Did you say you wanted dark mode?](https://cathy.sarisky.link/did-you-say-you-wanted-dark-mode/)**
>
> How to get dark mode into the PORTAL, in any custom theme.

What’s not described there is how to fork the Portal code. It’s now in the monorepo, here: [Ghost/ghost/portal at main · TryGhost/Ghost · GitHub](https://github.com/TryGhost/Ghost/tree/main/ghost/portal) . I haven’t seen good docs on how to do that. (Yes, I am a git/github newb. It’s an area I need to improve in, for sure!)

(For anyone thinking about using the build linked above, I haven’t rebuilt with the latest portal changes yet.)

---

<div class="post-metadata">

**Author:** ![dreamburger](https://avatars.discourse-cdn.com/v4/letter/d/f4b2a3/32.png) [@dreamburger](https://forum.ghost.org/u/dreamburger)\
**Post date:** [January 24, 2023, 3:57pm UTC](https://forum.ghost.org/t/editing-portal-style-with-code-injection/35671/6 "2023-01-24T15:57:44Z")

</div>

I can’t thank you enough for this 🙏

Let’s see if I can tweak this on my theme!
