# Theme component color definitions broken

**URL:** <https://meta.discourse.org/t/theme-component-color-definitions-broken/181389>\
**Category:** Bug\
**Created:** [February 28, 2021, 3:23pm UTC](https://meta.discourse.org/t/theme-component-color-definitions-broken/181389 "2021-02-28T15:23:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![fuzzyk](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fuzzyk/32/129208_2.png) [@fuzzyk](https://meta.discourse.org/u/fuzzyk)\
**Post date:** [February 28, 2021, 3:23pm UTC](https://meta.discourse.org/t/theme-component-color-definitions-broken/181389/1 "2021-02-28T15:23:46Z")

</div>

I cannot get color definitions in theme components to load. They simply never arrive in the browser.

I tried to migrate to color definitions because my themes broke with the recent 2.7.0.beta4 upgrade.

I have the following color definitions in multiple theme components (hence multiple code blocks):

```scss
:root {
    --my-post-name-color: #{dark-light-diff(#1e79a7, $secondary, 0%, 25%)};
}

```

```scss
$my-background: #ABDAFB;
$my-border: #38abe3;

:root {
    --my-quote-background: #{dark-light-choose($my-background, $primary-low)};
    --my-quote-border: #{dark-light-choose($my-border, blend-primary-secondary(5%))};
}

```

When I try to use the colors I define, the browser only reports that they are unknown and everything is broken.

One usage is like this:

```scss
aside.quote .title {
    background-color: var(--my-quote-background);
    border-left: 5px solid var(--my-quote-border);
}

aside.quote blockquote {
    background-color: var(--my-quote-background);
    border-left: 5px solid var(--my-quote-border);
} 

```

What am I doing wrong?

The only non-default colors I can see are from the BBCode plugin.

---

<div class="post-metadata">

**Author:** ![fuzzyk](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fuzzyk/32/129208_2.png) [@fuzzyk](https://meta.discourse.org/u/fuzzyk)\
**Post date:** [February 28, 2021, 3:28pm UTC](https://meta.discourse.org/t/theme-component-color-definitions-broken/181389/2 "2021-02-28T15:28:32Z")

</div>

Upon further investigation I found that theme component color definitions changes do not propagate into a theme. They _can_ be made to propagate (once) by changing the theme’s own color definitions.

Adding or removing theme components also does not update the effective color definitions.

Looks like a bug?

---

<div class="post-metadata">

**Author:** ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)\
**Post date:** [February 28, 2021, 3:31pm UTC](https://meta.discourse.org/t/theme-component-color-definitions-broken/181389/4 "2021-02-28T15:31:24Z")

</div>

Yes, confirmed, it is a bug, sorry about that, will fix it shortly.

---

<div class="post-metadata">

**Author:** ![pmusaraj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pmusaraj/32/119489_2.png) [@pmusaraj](https://meta.discourse.org/u/pmusaraj)\
**Post date:** [March 1, 2021, 6:23pm UTC](https://meta.discourse.org/t/theme-component-color-definitions-broken/181389/5 "2021-03-01T18:23:28Z")

</div>

[FIX: Update digest when updating color definitions in theme component… · discourse/discourse@bfa3e24 · GitHub](https://github.com/discourse/discourse/commit/bfa3e24e48ef7eb7d4c2c31e2f9d71e436e1f25c) should fix this.

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [March 2, 2021, 5:04am UTC](https://meta.discourse.org/t/theme-component-color-definitions-broken/181389/6 "2021-03-02T05:04:47Z")

</div>


