django-nested-inline
django-nested-inline copied to clipboard
change hardcoded css colors to utilize css vars
The chosen variables are the ones that django uses for each of those elements, and ideally can also be omitted entirely in a future commit.
This helps integrate django-nested-inline with django admin's new dark theme, as well as custom themes that are written around django admin's css vars.
Can you make sure this will also work for older django versions? I like the use of css vars and this will end up being quite useful in my use case as well, but i'm worried about compatability with older django versions that don't define values for those variables.
I can't think of a neat way to have this work for versions that don't define css variables, other than maintaining two copies of the CSS files and serving whichever one suits the django version that the project is running, similar to js loading:
admin.py
css = {
"all": ('admin/css/forms-nested%s.css' % ('' if VERSION < (3,2) else 'vars'),)
}
This however causes an issue with having to maintain both versions of the css file.
Can you think of a more elegant solution?
Guys, these changes are great, exactly what I'm looking for. Merge would be nice.