omji / django-tabbed-admin

Easily add tabs to django admin forms
BSD 3-Clause "New" or "Revised" License
63 stars 71 forks source link

Alternate CSS for use with grappelli #3

Closed fdemmer closed 8 years ago

fdemmer commented 8 years ago

Not sure how you could package alternate static files for different admin styles... but this is what i use to make it look nicer with grappelli.

selection_026

from tabbed_admin import TabbedModelAdmin as TabbedModelAdminBase

class TabbedModelAdmin(TabbedModelAdminBase):
    """
    Subclass including some CSS fixes for grappelli.
    """
    class Media:
        css = {
            'all':  ('core/css/tabbed-admin.css',)
        }
.ui-tabs {
    background-color: white;
    border: 0;
    min-width: 960px;
}

.ui-widget textarea,
.ui-widget input,
.ui-widget select {
    font-family: Arial, sans-serif;
}

.ui-widget {
    font-family: Arial, sans-serif;
    font-size: 1em;
}

.ui-tabs .ui-tabs-panel {
    background-color: white;
    padding: 5px 4px 0;
}

.ui-tabs .ui-tabs-anchor {
    font-size: 9pt
}

.ui-widget-content {
    background: none;
}

.ui-tabs .ui-widget-content a {
    color: #309BBF;
}

.ui-tabs .ui-widget-content a:hover {
    color: #444;
}

.ui-tabs .ui-widget-header {
    background-image: linear-gradient(#E5E5E5, #DBDBDB);
}

.ui-tabs .ui-state-default {
    background-image: linear-gradient(#CEE9F2, #E1F0F5);
}

.ui-tabs .ui-state-active {
    background-image: linear-gradient(#CEE9F2, #fff);
    border-color: #BBB;
}

.ui-tabs .ui-state-active a {
    color: #444;
}
omji commented 8 years ago

Hi Florian,

I am so sorry, I missed this thread. Thanks a million for your contribution, this is really awesome. I have put it by default when grappelli is in INSTALLED_APPS. And released version 0.0.6 from it.

Thansk again, and all my apologies

fdemmer commented 8 years ago

cool :+1: :smile: