elky / django-flat-theme

A flat theme for Django admin interface. Modern, fresh, simple.
Other
413 stars 45 forks source link

Some way for 3rd party apps to target flat theme via CSS #26

Closed andybak closed 8 years ago

andybak commented 9 years ago

I've got an admin extension that needs it's CSS tweaked for flat.

So my selector is:

.selective-inline-item .inline-related 

I'd like to vary it but only for sites using the flat theme. I can think of various hacky workarounds but the nicest thing would be a class on the admin body so that any 3rd party app can have flat theme specific rules:

body.flatadmin .selective-inline-item .inline-related 

My app can then remain backwards compatible without needing me to maintain separate versions and for users to do anything special when they upgrade to Django 1.9

elky commented 8 years ago

Done in https://github.com/elky/django-flat-theme/commit/49c9b059de3398577417234399a94b5a6ece4c30 and available in 1.1.3

django-flat-theme now adds .flat-theme CSS class to admin <body> element so you can override some rules.