Board Thread:New Features/@comment-2240397-20161117114915

Hello!

Portable infoboxes are back. This time I'd like to discuss with you the biggest elephant in the room - custom infobox theming!

We have noticed that some communities prefer to theme their infoboxes per article. Usually to reflect the unique set of colors, characteristic to article's topic. For example: super hero color theme. Right now the only option to do this is through using JS or per-article theming. Both of which are hard to code, maintain and to be frank, not portable (color info is lost on non-desktop devices).

That's why together with our team we bend our minds on how to support it. We would like to hear your honest feedback and ideas how to make it better. All kinds of constructive criticism and support are also welcome. We would also like to hear if this solution would work for your community or not (please let us know why so we can fix it).

Remember it is a first step ;)

Here goes our idea
To support custom header colors we want to introduce new infobox tag attributes. These tags will allow control of infobox headers and titles colors. Users will be able to define these colors from both template page and while using template in article.

Basic, per template tags
accent-color-default - sets the color for all titles and headers backgrounds. Accepts hex color valuesin template. Useful if you want to define color per template.

accent-color-text-default - same as accent-color-default, but for text color.

More advanced options, that will allow per article styling
accent-color-source - portable infobox attribute that accepts variable name. Think of it as source in data tag, but for styling the whole infobox.

accent-color-text-source - same as accent-color-source, but for text color.

What we found cool about these tags is that they override themselves. So if you define per template color, you can always override it per usage in article. Exactly like with default tags in fields.

Usage Examples
When using such template.  Section name

Invocation without accent colors specified

will use defaults and return: Page name Section name

When user specifies accent colors

they override defaults Page name Section name

If it proves successful we will add it to infobox builder. 