# Discourse's CSS variables aren't set

**URL:** https://meta.discourse.org/t/discourses-css-variables-arent-set/264024
**Category:** Support
**Created:** [May 5, 2023, 10:06pm UTC](https://meta.discourse.org/t/discourses-css-variables-arent-set/264024 "2023-05-05T22:06:52Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Ibrahim\_salem](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ibrahim_salem/32/217422_2.png) [@Ibrahim\_salem](https://meta.discourse.org/u/Ibrahim_salem)
#### Post date: [May 5, 2023, 10:06pm UTC](https://meta.discourse.org/t/discourses-css-variables-arent-set/264024/1 "2023-05-05T22:06:52Z")

</div>

No matter what theme I’m using, all menus and popup alerts / dialogs show with transparent background color !!

 ![image](https://global.discourse-cdn.com/meta/original/4X/6/c/2/6c2d3f7ae841a2a2b1903ac5eb406130d32b7382.png)

---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [May 5, 2023, 10:31pm UTC](https://meta.discourse.org/t/discourses-css-variables-arent-set/264024/2 "2023-05-05T22:31:32Z")

</div>

looks like maybe you do not have a color palette assigned to the theme? you need to assign color palettes to a theme. there should be a drop down field to select one at the top of the theme page in admin-customize-themes. did the color palette for that theme get removed?

---

<div class="post-metadata">

### Author: ![Ibrahim\_salem](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ibrahim_salem/32/217422_2.png) [@Ibrahim\_salem](https://meta.discourse.org/u/Ibrahim_salem)
#### Post date: [May 6, 2023, 9:45am UTC](https://meta.discourse.org/t/discourses-css-variables-arent-set/264024/3 "2023-05-06T09:45:17Z")

</div>

There is a color pallete assigned to the theme .. I can easily for example change the background color to #ffffff using the custom css section but this only works with default theme ..

Is this an error or something I should report ?

---

<div class="post-metadata">

### Author: ![Lhc\_fl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lhc_fl/32/268115_2.png) [@Lhc\_fl](https://meta.discourse.org/u/Lhc_fl)
#### Post date: [May 6, 2023, 10:05am UTC](https://meta.discourse.org/t/discourses-css-variables-arent-set/264024/4 "2023-05-06T10:05:14Z")

</div>

This doesn’t look like the default theme, is it a custom theme that made the old dropdown menu transparent by mistake?

---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [May 6, 2023, 12:07pm UTC](https://meta.discourse.org/t/discourses-css-variables-arent-set/264024/5 "2023-05-06T12:07:20Z")

</div>

yea it’s odd to see the transparent elements. you kinda have to do that on purpose so i wonder if there’s some code from another theme in there or something. i use semi transparent stuff on our site but i code all that in. looks like corners have been rounded a bit too so there’s some customization there i think. did you copy some code or adapt this from another theme? did you edit or add any CSS recently?

---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [May 6, 2023, 12:13pm UTC](https://meta.discourse.org/t/discourses-css-variables-arent-set/264024/6 "2023-05-06T12:13:39Z")

</div>

i would view your forum in [safe mode](https://meta.discourse.org/t/53504?silent=true) and go from there.

---

<div class="post-metadata">

### Author: ![Ibrahim\_salem](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ibrahim_salem/32/217422_2.png) [@Ibrahim\_salem](https://meta.discourse.org/u/Ibrahim_salem)
#### Post date: [May 6, 2023, 4:11pm UTC](https://meta.discourse.org/t/discourses-css-variables-arent-set/264024/7 "2023-05-06T16:11:54Z")

</div>

No, this happend even before installing any theme .. I assume it was using a defaulkt theme or something as shown from the admin / settings ..

---

<div class="post-metadata">

### Author: ![Ibrahim\_salem](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ibrahim_salem/32/217422_2.png) [@Ibrahim\_salem](https://meta.discourse.org/u/Ibrahim_salem)
#### Post date: [May 6, 2023, 4:13pm UTC](https://meta.discourse.org/t/discourses-css-variables-arent-set/264024/8 "2023-05-06T16:13:03Z")

</div>

None, I’m still trying toi figure out .. this is supposed to be a fresh install of discourse / docker ..  
I’m using the main branch .. could this be too early to use or something .. I can;t even see anyone has reported such case

---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [May 6, 2023, 4:43pm UTC](https://meta.discourse.org/t/discourses-css-variables-arent-set/264024/10 "2023-05-06T16:43:43Z")

</div>

there some coding going on there, the avatar and menus have rounded corners and the transparency looks suspicious. what is in common CSS and desktop CSS?

do you have theme components intalled? have you run in [safe mode](https://meta.discourse.org/t/53504?silent=true)?

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [May 6, 2023, 5:04pm UTC](https://meta.discourse.org/t/discourses-css-variables-arent-set/264024/11 "2023-05-06T17:04:22Z")

</div>

It seems you are not using the default theme. Is the theme public? Did you do customization on it?

Also, I see on your forum that you miss the color definitions.

There is an `asasy` color scheme that you’re using, but it’s empty. I’m not sure how it’s even possible.

Try to change the color scheme to the default one?

---

<div class="post-metadata">

### Author: ![Ibrahim\_salem](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ibrahim_salem/32/217422_2.png) [@Ibrahim\_salem](https://meta.discourse.org/u/Ibrahim_salem)
#### Post date: [May 6, 2023, 5:18pm UTC](https://meta.discourse.org/t/discourses-css-variables-arent-set/264024/12 "2023-05-06T17:18:34Z")

</div>

I did .. same thing  
I disabled everything

 ![image](https://global.discourse-cdn.com/meta/original/4X/9/9/f/99f15b7237ab2f4186038349e60e89650120b842.png)

---

<div class="post-metadata">

### Author: ![Ibrahim\_salem](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ibrahim_salem/32/217422_2.png) [@Ibrahim\_salem](https://meta.discourse.org/u/Ibrahim_salem)
#### Post date: [May 6, 2023, 5:20pm UTC](https://meta.discourse.org/t/discourses-css-variables-arent-set/264024/13 "2023-05-06T17:20:15Z")

</div>

This is what I got first time I run the system .. using the default theme .. then I tried to install other themes .. but same issue ..

The point I forgot to mention, the database was running on old discourse .. so this happened after upgrading the latest version ..

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [May 6, 2023, 5:30pm UTC](https://meta.discourse.org/t/discourses-css-variables-arent-set/264024/14 "2023-05-06T17:30:32Z")

</div>

When you go there:

 ![image](https://global.discourse-cdn.com/meta/original/4X/0/5/7/0579fc5d88df686e97f47da890bf4947a588503b.png)

Do you see, for example, the “mint-light” color scheme?

(On your forum, the color definitions are empty as well).

---

<div class="post-metadata">

### Author: ![Ibrahim\_salem](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ibrahim_salem/32/217422_2.png) [@Ibrahim\_salem](https://meta.discourse.org/u/Ibrahim_salem)
#### Post date: [May 6, 2023, 5:40pm UTC](https://meta.discourse.org/t/discourses-css-variables-arent-set/264024/15 "2023-05-06T17:40:00Z")

</div>

Yes I see it .. I can;t change it directly so I clonded it .. changed all colors and used the new color pallete for the theme .. same issue ..

---

<div class="post-metadata">

### Author: ![Ibrahim\_salem](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ibrahim_salem/32/217422_2.png) [@Ibrahim\_salem](https://meta.discourse.org/u/Ibrahim_salem)
#### Post date: [May 6, 2023, 5:41pm UTC](https://meta.discourse.org/t/discourses-css-variables-arent-set/264024/16 "2023-05-06T17:41:19Z")

</div>

In case the related theme tables in database (example: theme\_fields) .. I found some old stuff from the previous vertsion of discourse .. I’m wonsdering if that would cause the issue .. can I reset this table ?

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [May 6, 2023, 5:52pm UTC](https://meta.discourse.org/t/discourses-css-variables-arent-set/264024/17 "2023-05-06T17:52:58Z")

</div>

Even if you change the color scheme in your preferences?

 ![image](https://global.discourse-cdn.com/meta/original/4X/0/e/4/0e4d7d384302c56c993d4bc2d9c9e5d56e78929b.png)

---

<div class="post-metadata">

### Author: ![Ibrahim\_salem](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ibrahim_salem/32/217422_2.png) [@Ibrahim\_salem](https://meta.discourse.org/u/Ibrahim_salem)
#### Post date: [May 6, 2023, 5:59pm UTC](https://meta.discourse.org/t/discourses-css-variables-arent-set/264024/18 "2023-05-06T17:59:56Z")

</div>

Yes .. even if I did that ..  
Also, whenever I use a dark color pallette .. and I refresh the page, I see a dark screen then I switches to light mode after .. I’m afraid my theme tables are messed up !!

---

<div class="post-metadata">

### Author: ![Ibrahim\_salem](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ibrahim_salem/32/217422_2.png) [@Ibrahim\_salem](https://meta.discourse.org/u/Ibrahim_salem)
#### Post date: [May 6, 2023, 6:01pm UTC](https://meta.discourse.org/t/discourses-css-variables-arent-set/264024/19 "2023-05-06T18:01:58Z")

</div>

Notice when I inspect the page for the menu div section style .. I found this

the secondary variable is calculated as rgba(0,0,0,0) .. I don’t know from where this coming

 ![image](https://global.discourse-cdn.com/meta/original/4X/9/6/6/96665a2408172fe743161052c518262327072fe2.png)

---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [May 6, 2023, 6:16pm UTC](https://meta.discourse.org/t/discourses-css-variables-arent-set/264024/20 "2023-05-06T18:16:25Z")

</div>

those rgba(xxx) codes are making everything transparent. that is exactly what i was talking about.

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [May 6, 2023, 6:16pm UTC](https://meta.discourse.org/t/discourses-css-variables-arent-set/264024/21 "2023-05-06T18:16:46Z")

</div>

What you see is the default values.

The issue is that the generated color definitions CSS is empty for some reason.  
If you look at the file, there is nothing inside.

 ![image](https://global.discourse-cdn.com/meta/original/4X/5/5/0/5505d7350203daff28474df18099bf93b9173cc9.png)

Even with the default theme/color scheme, do you still have the issue?

 ![image](https://global.discourse-cdn.com/meta/original/4X/6/e/9/6e98bcb382fb219bc2fa8812dc7fd8d9b5c93412.png)

If you say so, I’m unsure what your issue would be.

[Next page](https://meta.discourse.org/t/discourses-css-variables-arent-set/264024.md?page=2)
