# Könnten Inline-Styles generell mit CSS-Variablen gesetzt werden?

**URL:** <https://meta.discourse.org/t/could-inline-styles-be-generally-set-with-css-variables/368612>\
**Category:** Development\
**Created:** [2. Juni 2025 um 22:05 UTC](https://meta.discourse.org/t/could-inline-styles-be-generally-set-with-css-variables/368612 "2025-06-02T22:05:00Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)\
**Post date:** [26. Juni 2025 um 20:10 UTC](https://meta.discourse.org/t/could-inline-styles-be-generally-set-with-css-variables/368612/2 "2025-06-26T20:10:15Z")

</div>

Sicher, wir möchten CSS-Variablen generell an mehr Stellen haben. Wenn es andere Stellen gibt, an denen dies praktisch wäre und die derzeit keine haben, lassen Sie es uns wissen!

Dies verwendet `--category-banner-background` und `--category-banner-color`

> <https://github.com/discourse/discourse-category-banners/pull/90>
>
> Requested here: https://meta.discourse.org/t/could-inline-styles-be-generally-se…t-with-css-variables/368612
> 
> This replaces the inline colors with variables that are assigned the colors. The variables are then applied to the \`div\[class^="category-title-header"\]\`. This shouldn't result in any changes other than how the colors are set, overrides in themes will still apply.

---

_[View the full topic](https://meta.discourse.org/t/could-inline-styles-be-generally-set-with-css-variables/368612)._
