Skip to main content
Recent Posts
1
Feature Discussion / Re: Remove inline colors
Last post by Antechinus -
If you're going to let them choose whatever they want, there's little point worrying about whether the defaults match your theme. If they have any sense they'll choose something that matches, and if they haven't they'll make it gruesome.

And then this all falls down if they are running multiple themes and/or a multi-variant theme, because chances are you won't be able to get one default that matches them all anyway. In that situation you'd want the sort of solution I suggested: the ability to use custom CSS to change colour by theme/variant if you have more than one operational.

Look at it this way: your complaint is that stuff is hard-coded into the templates, but your idea for a "fix" is to hard-code more stuff into the templates.
2
Feature Discussion / Re: Remove inline colors
Last post by TaliaJoy -
OK, how's this for a solution: default colors for default member groups are set by the theme, but they can be overridden by the forum admins in the admin panel.

I don't want to get in the way of admins choosing the desired colors, but it's a bit painful when the default color for the member group set by ElkArte is something with very poor visibility against the theme background. So I would say, let them choose whatever colors they want, but the default should be something that theme authors can set to be aesthetically fitting.
5
Feature Discussion / Re: Remove inline colors
Last post by Antechinus -
It's actually quite easy for themers to work around it. Inline styles can be overridden by using !important in the CSS file.

IOW, template:
Code: [Select]
<a href="spambotzrus.org" class="stinky" target="_your_wallet" style="color: #reallygruesome;">ZOMG</a>

CSS file:
Code: [Select]
.stinky {color: #somethingnicer !important;}

By using this method you can easily define group colours by theme variant if you want to, regardless of what is set in admin.

Note that this is not limited to inlines styles set by PHP. It will also work for overriding inline styles set by javascript, if you need to do that.

Obligatory disclaimer: Yes, using !important indiscriminately is a sign of someone who does not know how CSS works, and will result in the deaths of millions of innocent kittens and everyone thinking your code was written by a muppet, but there are instances when using !important is the only way to sanely get the job done. In such specific cases, there is no real harm in using it as long as you are careful. :)