Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

how to block css from changing dashboard.

I'm trying to make a whole bunch of custom themes for my users using the ThemeChooser plugin. The only problem is theme changes affect the dashboard in ways that affects usability. Is there a way to bar the .css in ThemeChooser/design/ from affecting the dashboard?

Comments

  • You can use the :not css selector?

    body:not(.Dashboard.Settings.index) p
    {
    }

    should affect all non-dashboard p's methinks.

    So in that way you can disable all CSS rules that affect usability.

    You could also edit the plugin, I think something like this would work (replace the beginning of Base_Render_Before with this snippet):

    public function Base_Render_Before($Sender) {
            $Session = Gdn::Session();
            if(gdn::controller() instanceof SettingsController || !$Sender->Data || !$this->Enabled())
            {
                  return;
            }
    

    Fair warning: I've not yet tested that snippet of code to see if it really does what you want to do, and I don't know if it will continue to work in new versions of Vanilla.

Sign In or Register to comment.