change hardcoded css colors to utilize css vars#125
change hardcoded css colors to utilize css vars#125silentbugs wants to merge 3 commits intoOskarPersson:masterfrom
Conversation
|
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 This however causes an issue with having to maintain both versions of the css file. Can you think of a more elegant solution? |
db43b2b to
05a9a37
Compare
|
Guys, these changes are great, exactly what I'm looking for. Merge would be nice. |
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
…ables in admin site
2d85361 to
be2eee6
Compare
|
@daniel-brenot Since there hasn't come up a more elegant way of doing this, I've decided to add a second version of the old CSS file with the colors defined. Please review this with older versions of django as well. |
|
This package is super useful, and would love to see this released. For now, I've copied the CSS file into my project and pointed my admin class at it, and it works great. Anything else folks can do to help get this released to the world 😄? PS: several Django versions were released since this was opened and the older versions that require hardcoding variables are all EOL as far as I know... |
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.