# Switching between theme cause font flash of unstyled text effect

**URL:** <https://forum.inductiveautomation.com/t/switching-between-theme-cause-font-flash-of-unstyled-text-effect/44725>\
**Category:** Ignition Early Access\
**Created:** [March 21, 2021, 7:47pm UTC](https://forum.inductiveautomation.com/t/switching-between-theme-cause-font-flash-of-unstyled-text-effect/44725 "2021-03-21T19:47:51Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [March 21, 2021, 7:47pm UTC](https://forum.inductiveautomation.com/t/switching-between-theme-cause-font-flash-of-unstyled-text-effect/44725/1 "2021-03-21T19:47:51Z")

</div>

Hi  
Even opening the client on the same computer with the gateway, changing the theme, causes the ’ font flash of unstyled text’ effect.

![theme](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/a/faaf191a2bf85486a045eaa56470b80c4d55c528.gif)

This cause every time user changes the theme all font change to some default fonts like ‘Times New Roman’ and after some time the font display correctly again.(with sans-serif)  
I know there is a load time for a new CSS file for each theme, but it is nice if the perspective cache or save the current font theme until the browser loads the new theme file.  
Or may there is a trick here so I can prevent this.

---

<div class="post-metadata">

**Author:** ![edueduardogarcia](https://avatars.discourse-cdn.com/v4/letter/e/3da27b/32.png) [@edueduardogarcia](https://forum.inductiveautomation.com/u/edueduardogarcia)\
**Post date:** [December 12, 2021, 5:26pm UTC](https://forum.inductiveautomation.com/t/switching-between-theme-cause-font-flash-of-unstyled-text-effect/44725/2 "2021-12-12T17:26:05Z")

</div>

Hey Nader,

Bumping up the topic.

I’m also annoyed by this, although it’s not a big deal.

Have you found any solution or workaround?

Thanks.

---

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [December 12, 2021, 5:51pm UTC](https://forum.inductiveautomation.com/t/switching-between-theme-cause-font-flash-of-unstyled-text-effect/44725/3 "2021-12-12T17:51:40Z")

</div>

Unfortunately not untill now

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [December 16, 2021, 3:00pm UTC](https://forum.inductiveautomation.com/t/switching-between-theme-cause-font-flash-of-unstyled-text-effect/44725/4 "2021-12-16T15:00:35Z")

</div>

If the font stays the same across both styles maybe you can use css injection in the styleclasses as i dont think these get reloaded

Seems to work… a bit bothersome to do tho xd  
There realy should be a default css file that always gets loaded in too sigh xd

(just tested with fantasy font)  
`} body,button { font-family: fantasy; font-weight: 400; font-size: 1rem; background-color: var(--containerRoot); font-size: 100%; }{`

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/0/50186f190655757492360ab434f5f9a2a39d5fc3.png)

---

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [December 17, 2021, 3:06am UTC](https://forum.inductiveautomation.com/t/switching-between-theme-cause-font-flash-of-unstyled-text-effect/44725/5 "2021-12-17T03:06:23Z")

</div>

I add those in global css file but then try to switch theme it always see this problem

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [December 17, 2021, 7:33am UTC](https://forum.inductiveautomation.com/t/switching-between-theme-cause-font-flash-of-unstyled-text-effect/44725/6 "2021-12-17T07:33:25Z")

</div>

What is the global css file? I didnt see one in the perspective theme folder

---

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [December 19, 2021, 3:43am UTC](https://forum.inductiveautomation.com/t/switching-between-theme-cause-font-flash-of-unstyled-text-effect/44725/7 "2021-12-19T03:43:04Z")

</div>

I mean this folder:  
C:\Program Files\Inductive Automation\Ignition\data\modules\com.inductiveautomation.perspective\themes

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [December 20, 2021, 8:48am UTC](https://forum.inductiveautomation.com/t/switching-between-theme-cause-font-flash-of-unstyled-text-effect/44725/8 "2021-12-20T08:48:02Z")

</div>

Ah yea there are only the theme css files there unfortunatly there doesnt seem to be a globel default css file. Which would stay in effect regardless of the theme chosen.  
Which would prevent the fout effect.

So you could like i did, use css injection for some of the default styles that both themes use, but its not ideal
