What about an easier styling/theming system?

The front-end work of defining all the colors with variables is in place - I’d be super happy if what ultimately happens is that all the fields in the backend editor are generated by reading the variables in the SCSS file… so if variables are added and removed from the core in the future, it adjusts without any additional effort. I think some fine-tuning of how general or specific the variables are may happen once there’s a usable backend editor.

It seems to keep getting higher on the priority list as 1.0 approaches, so we’ll know more soon!

1 Like

I have done a robust re-skinning of Discourse, here, and might I suggest that we add a toggle to the custom CSS box for SCSS or CSS? I think the CSS bit could be loaded in after the asset packer CSS (as it is now), whereas the SCSS customizations could be incorporated into the packer, and allow use of variables/functions defined by the core SCSS files. I’m not sure how this would impact theme store or whatever, but it would take some of the pain out of hand coding the CSS.

In case you didn’t already notice, the admin customize panel is always SCSS, and it gets compiled into a CSS file like this one:

http://talk.extinct.io/uploads/stylesheet-cache/070dd36f-4fb3-4df6-bfcf-f607b6365f5f.css?e2dc1000480f6178e7678179b4bb482f (NB: fragile link)

Yes and thanks for this feature ! That contribute to clean my css and make color easy to change :slight_smile:

You are AWESOME! Did not even think to try that! Maybe it should be stated somewhere, with a link out to the SCSS docs. Thanks!

I’m thinking something like this for the admin section… anything that changes the opacity from 100 would have to be converted from HEX to RGBa, complicates things a little bit… but seems like something that would be useful.

Support for a color picker would be nice too, and there are a bunch of javascript pickers floating around ( if we’re not going to roll our own )… though I’m not sure what the best option is. I used JSColor for this example… It’s ugly by default, but simple to restyle.

cc @neil

9 Likes

I like the first mockup better. I’m not sure a color picker is needed. In general, you want to choose the colors using some other tool anyway and just plug them in here. Text input is fine for that and makes the ui simpler.

2 Likes

I’d say make the js color picker a lightweight plugin.

Update:

@neil is working on the new front-end here this week. It is going to kick ass.

6 Likes

For completeness, I’m adding to @awesomerobot’s mockup:

Note the buttons and check boxes at the bottom.

The :white_check_mark:, :x:, and reset to default buttons are from the Settings UI, where each value is saved individually and immediately. But I don’t think we want each color value to be saved to the server immediately like that. Colors will be saved with the Save button at the bottom like the rest of the customization tabs.

So I don’t think we need the :white_check_mark:. But an undo button that puts back the saved value would be useful.

What does reset to default do?

  • use the default value from variables.scss?
  • if a built-in theme was chosen, get the value from that theme?
1 Like

How would this work with enabling multiple site customizations at the same time? There could be conflicts between colors defined in different site customizations that are enabled at the same time.

2 Likes

Are there any plans in the pipeline for a WordPress style theming system (independent and isolated from core)? I guess the real equivalent would be bundling all the handlebars templates into a plugin.

As nice as Discourse is at the moment, it’d be nice to have a way to make each forum structurally different (as opposed to just differently coloured).

That’s a good question… maybe variables should live outside of a customization then?

I think ideally we would have two different top-level tabs in the customize section, one for customizing colors and the other for creating CSS/header customizations that we have right now.

The colors tab doesn’t even need to be shown if the upcoming suppress_default_style_sheet site setting is set to true.

2 Likes

I think this makes sense, and solves the problem of enabling multiple customizations. You choose your colour theme, and then you can make customizations.

1 Like

I like this but I would add MailChimp’s suggested or popular colors as it takes some of the guesswork out:

3 Likes

Perhaps color scheme plugins for those of us who are not artistically or design inclined?

2 Likes

Not a bad idea - I just recently saw http://www.colormoo.com/ on hackernews and was pretty impressed.

3 Likes

You also have https://kuler.adobe.com/ to find colors scheme.

The unfinished color theme UI is available to play with:

The CSS, HTML tab is the existing “Site Customization” stuff. Better name ideas are welcome.

As the warning says, it doesn’t make any changes to the site. Stuff to do next:

  • add a color scheme from a plugin
  • asset pipeline stuff to include the custom colors

Also, what is a “Theme”? I imagine it’s a bundle that includes one (or more, but choose one?) color scheme, and CSS and HTML.

2 Likes