same class in several stylesheets

Servus together,

i`ve only a small question.
If i have one class in several css.php in one theme, whichone would be used.
I wanna have several style-colors on different plugins, like group-design in orange, profil-design in brown, etc.
I thought that i can use every css.php in the plugin/css folder to define the plugin-style  - but fat chance, no chance!
So i don`t know where to define the background in diferent styles for several plugins.

Has Anybody an idea?

  • Sure, I think this can be achieved.

    I guess the trick to this would to understand that the plugin, including it's css, over-rides the core. So, in your plugin css file you probably need to re-define the 'body' properties. For example, if you want to manipulate the background color of all pages under a plugin to a light grey, you would open that plugin's css file and add:

    body {

    background-color: #cccccc;

    }

    And so on.

    I honestly haven't tried this myself, but if science doesn't lie, then it should work. Give it a try and let us know please.

    Cheers.

    -Carlos

  • I thought the same as you Carlos, but sadly not.
    The plugin stylesheets overright the default stylesheet of the theme.
    Elgg seems not to distinguish wich of the theme stylesheets are in use.
    So the basic level stylesheet is the default/css,php and the other plugin/css.php of the themes can complement the default/css.php.
    I found no way to change the stylesheets for several plugins. :o(
    Only one body/background-color can be in use. But i don`t understand why the group/body/background-color stands on a higher level as the  blog/body/background-color.
    If i give both stylesheets a different background-color, it dominates the group/background-color.
    For me it`s strange to understand.

  • I agree.. this is a little bit of a puzzle.. But it appears that the plugin that is located towards the bottom in the tools administration over-rides what's above it.. a simple test of moving plugins around would answer that.

    Now, with regards to the original problem, I think the solution may be in the form of a script telling each plugin what css file to deploy. This in itself can be a plugin.. and just off the top of my head, the plugin will throw the script into the page_elements/header.php so it's picked up globally. Once the script mis triggered, it will tell whatever page displayed to go fetch the relevant css. To be honest, it's a big ask.. and unless you have a clear mind and not occupied by anything else, it would take some time to create that plugin. I am writing 2 small plugins at the moment, but once finished, I'll look at this one. Unless of course someone else beats me to it, which would be music to my ears!!

    -Carlos

  • Okay Carlos, that`s a deal ;o)
    It would really help if the plugin/css.php could override classes and ids from the default/css.php.
    So that the plugin/css.php would stay on a higher level as the default/css.php.

    I`m not able to write this plugin. So i`ll wait in glad anticipation of the result.

    Greez
    michi