# What about an easier styling/theming system?

**URL:** <https://meta.discourse.org/t/what-about-an-easier-styling-theming-system/12346>\
**Category:** Feature\
**Created:** [2014年二月1日 00:11 UTC](https://meta.discourse.org/t/what-about-an-easier-styling-theming-system/12346 "2014-02-01T00:11:51Z")\
**Posts on this page:** 15\
**Page:** 3

<div class="post-metadata">

**Author:** ![Naatan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/naatan/32/108428_2.png) [@Naatan](https://meta.discourse.org/u/Naatan)\
**Post date:** [2014年四月25日 20:52 UTC](https://meta.discourse.org/t/what-about-an-easier-styling-theming-system/12346/41 "2014-04-25T20:52:35Z")

</div>

If this means being able to _change_ colors rather than _override_ them I’m all for it! 🙂 Nice work thus far!

---

<div class="post-metadata">

**Author:** ![neil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neil/32/102150_2.png) [@neil](https://meta.discourse.org/u/neil)\
**Post date:** [2014年四月25日 20:56 UTC](https://meta.discourse.org/t/what-about-an-easier-styling-theming-system/12346/42 "2014-04-25T20:56:34Z")

</div>

Override in that context means that it’s different than Discourse’s default theme. What do you mean by _change_?

---

<div class="post-metadata">

**Author:** ![Naatan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/naatan/32/108428_2.png) [@Naatan](https://meta.discourse.org/u/Naatan)\
**Post date:** [2014年四月26日 17:14 UTC](https://meta.discourse.org/t/what-about-an-easier-styling-theming-system/12346/43 "2014-04-26T17:14:35Z")

</div>

For example if I set a link color to red then I’d like the CSS that was defining the link color as blue to be changed to say red, rather than have it define a new css rule which simply overrides the color value (this causes issues with CSS transitions, and is overall just messy and error-prone).

---

<div class="post-metadata">

**Author:** ![neil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neil/32/102150_2.png) [@neil](https://meta.discourse.org/u/neil)\
**Post date:** [2014年四月27日 18:46 UTC](https://meta.discourse.org/t/what-about-an-easier-styling-theming-system/12346/44 "2014-04-27T18:46:42Z")

</div>

Oh, yeah it _changes_. ie, It writes the variables with the configured values once.

---

<div class="post-metadata">

**Author:** ![Onaldan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/onaldan/32/122541_2.png) [@Onaldan](https://meta.discourse.org/u/Onaldan)\
**Post date:** [2014年四月28日 08:47 UTC](https://meta.discourse.org/t/what-about-an-easier-styling-theming-system/12346/45 "2014-04-28T08:47:47Z")

</div>

Don’t forget this, please: [https://meta.discourse.org/t/how-do-we-customize-embedded-discourse-css/14617](https://meta.discourse.org/t/how-do-we-customize-embedded-discourse-css/14617)

> [@larry](#):
>
> Is there a place to customize embedded discourse CSS?

I start to play with Ghost blog with my dark theme and I also need to custom the embedded css stylesheets. [http://blog.onaldan.com/avril-2014-turquie-cappadoce/](http://blog.onaldan.com/avril-2014-turquie-cappadoce/) (at bottom).

---

<div class="post-metadata">

**Author:** ![neil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neil/32/102150_2.png) [@neil](https://meta.discourse.org/u/neil)\
**Post date:** [2014年五月15日 15:33 UTC](https://meta.discourse.org/t/what-about-an-easier-styling-theming-system/12346/46 "2014-05-15T15:33:32Z")

</div>

The themer is available to use! Give it a try!

 ![](https://global.discourse-cdn.com/meta/original/2X/4/44c664d58a337b68f2c15ec7bffa166be1e923ba.png) 

Still to do:

- support for dark themes
- embedded css
- a set of sample color schemes

---

<div class="post-metadata">

**Author:** ![probus](https://avatars.discourse-cdn.com/v4/letter/p/67e7ee/32.png) [@probus](https://meta.discourse.org/u/probus)\
**Post date:** [2014年五月19日 12:49 UTC](https://meta.discourse.org/t/what-about-an-easier-styling-theming-system/12346/47 "2014-05-19T12:49:56Z")

</div>

I think the default button colors should also be settable or adjust automatically for enough contrast between them and the background color. With a light greyish background the buttons disappear.

---

<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:** [2014年五月19日 13:30 UTC](https://meta.discourse.org/t/what-about-an-easier-styling-theming-system/12346/48 "2014-05-19T13:30:52Z")

</div>

Definitely a good point… I’ll look at the best way to add that. I’ve just recently submitted this PR  
[https://github.com/discourse/discourse/pull/2361](https://github.com/discourse/discourse/pull/2361)

Which detects the difference in lightness between the `$primary` (text etc,) and `$secondary` (background, etc) variables and adjusts how `scale-color` functions (this effects borders and a bunch of other minor elements right now). That’s a pretty simple function… buttons could certainly work in a similar way, [as outlined in this article about button text](http://zerosixthree.se/dynamically-change-text-color-with-sass/).

---

<div class="post-metadata">

**Author:** ![njoseph](https://avatars.discourse-cdn.com/v4/letter/n/5f9b8f/32.png) [@njoseph](https://meta.discourse.org/u/njoseph)\
**Post date:** [2014年五月20日 17:40 UTC](https://meta.discourse.org/t/what-about-an-easier-styling-theming-system/12346/49 "2014-05-20T17:40:36Z")

</div>

Well (lots of use of “color:white;”, mixed with everything else being “color:#XXX”). If we h

---

<div class="post-metadata">

**Author:** ![RabidFX](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rabidfx/32/114395_2.png) [@RabidFX](https://meta.discourse.org/u/RabidFX)\
**Post date:** [2014年六月17日 13:54 UTC](https://meta.discourse.org/t/what-about-an-easier-styling-theming-system/12346/50 "2014-06-17T13:54:05Z")

</div>

Thanks, this, along with some other recent improvements, made Discourse customization easier. 🙂

I was wondering if there were other steps planned to the process in the near future to allow more styling customizations?

(The users of my Discourse installation are asking about a per-user theme selection to allow both a “funky” and a “more-suitable-for-furtive-usage-at-work” theme. I can’t do that for the moment, right, it’s one or the other?)

---

<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:** [2014年六月17日 18:13 UTC](https://meta.discourse.org/t/what-about-an-easier-styling-theming-system/12346/51 "2014-06-17T18:13:05Z")

</div>

We don’t have any plans for per-user theme selection at the moment. Something like Stylish may be of use?

> **[Stylish](https://en.wikipedia.org/wiki/Stylish)**
>
> Stylish may refer to:

There are versions for both Firefox and Chrome.

---

<div class="post-metadata">

**Author:** ![RabidFX](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rabidfx/32/114395_2.png) [@RabidFX](https://meta.discourse.org/u/RabidFX)\
**Post date:** [2014年六月18日 08:40 UTC](https://meta.discourse.org/t/what-about-an-easier-styling-theming-system/12346/52 "2014-06-18T08:40:04Z")

</div>

Thank you - I think most of my users will find a browser plugin to be too cumbersome, but I’ll mention it anyway.

I think we will try to have our resident UX artist create a theme that would meet the needs of most of our userbase.  
Are there plans for a Discourse theme repository?

---

<div class="post-metadata">

**Author:** ![probus](https://avatars.discourse-cdn.com/v4/letter/p/67e7ee/32.png) [@probus](https://meta.discourse.org/u/probus)\
**Post date:** [2014年六月27日 07:31 UTC](https://meta.discourse.org/t/what-about-an-easier-styling-theming-system/12346/53 "2014-06-27T07:31:49Z")

</div>

Is it possible to set these values from a plugin yet? That would make this a lot more useful and powerful.

As a suggestion, you should be able to change fonts as well. Preferably from google fonts to make it simple.

---

<div class="post-metadata">

**Author:** ![neil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neil/32/102150_2.png) [@neil](https://meta.discourse.org/u/neil)\
**Post date:** [2014年七月1日 21:42 UTC](https://meta.discourse.org/t/what-about-an-easier-styling-theming-system/12346/54 "2014-07-01T21:42:38Z")

</div>

Yes, it is possible! Here’s an example of how to do that in a plugin.rb:

```plaintext
register_color_scheme 'Purples', {
  primary: 'EEE0E5',
  secondary: '2E0854',
  tertiary: '4B0082'
}

```

The names match the ones in the [colors.scss](https://github.com/discourse/discourse/blob/master/app/assets/stylesheets/common/foundation/colors.scss) file.

---

<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:** [2014年十月3日 16:16 UTC](https://meta.discourse.org/t/what-about-an-easier-styling-theming-system/12346/55 "2014-10-03T16:16:29Z")

</div>



[上一頁](https://meta.discourse.org/t/what-about-an-easier-styling-theming-system/12346.md?page=2)
