On 27 April 2017 at 23:18, Adam Johnson <m...@adamj.eu> wrote:

> Thanks for introducing me to a new CSS feature! I clearly don't keep up
> with front end stuff enough.
>
> Re: your issues:
>
> 1. From the support grid at the bottom of the Smashing Magazine article
> you linked, it looks like it's only IE 11 and Edge 14 that are major
> browsers that don't support it. However I feel like if Django is going to
> announce a feature like "you can override the Admin colours", it should
> work in all browsers. I'm not sure if we have a written policy for this
> though.
>
I guess it also depends on use cases, usually (where I work) we tend to
support only latest browsers when it comes to admin, since
it will be used by only a few people :) But I see your point.

A friend of mine was suggesting configuring colours in python, but this
means that the css would be rendered via python, which is
not ideal.
Another solution would be to add a JS polyfill to make it work on older
browsers, but I'm against it :)
Let's also keep in mind that this (if approved) will be included in django
2.0 or later, so the browser support will be even better :)


2. I'm not a huge fan of an additional HTTP request for every admin page
> load, for every admin site in existence whether or not the colours have
> been overridden. HTTP/2 isn't very widely deployed still so requests still
> ain't cheap.
>
Uhm, I think we can easily skip one request if the colours have not been
overridden. We can put the vars in base.css.
Then we can add the variables by changing the template (but that's more
cumbersome) either by adding an external css link
or by adding a style tag with the variables.


> 3. This can be overcome with a test to ensure the two files are in sync, I
> guess?
>
Uhm, true!


> And one more question: how much less painful is this to override the
> colours compared to the variable-less way, where you just clone the colour
> definitions of every rule in the original file in a second override file?
>
I haven't checked all the rules, but I think it will require quite a bit of
work. Maybe we can create a "template" file
that can be used to override quite easily the colours, but that doesn't
scale too well I think.


-- 
Patrick Guido Arminio

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAOUxZcugkWEnyx3wt7uXNYJE_Rgix-5N_iPwxMbZS73RA63%3DFw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to