Not using SVGs due to missing Modernizr class
stroebjo opened this issue · comments
The logos in the header and footer (and possible more images?) use a PNG and not the corresponding SVG file, since it is behind the Modernizr feature detection and depends on the html.mdzr-svg
class being present.
On high DPI screens the difference is visible from to the main djangoproject.com website.
The CSS file trac-env/htdocs/css/output.css
seems to be reused from the main project, since the main site includes a modernizr.js
the SVGs are used there.
Since SVG CSS backgrounds should be available anywhere I think the easiest solution would be to just add the mdzr-svg
class to the html
element, or include the modernizr.js
from the main project as well if it is still needed.
Thanks for the report! ✨
I removed modernizr
in 43d9616 because I was under the impression that it wasn't used anymore, but it seems I was wrong.
We already have a hack to manually add a css class to the <body>
(see https://github.com/django/code.djangoproject.com/blob/main/trac-env/templates/django_theme.html#L86), so I think at this point the correct fix is probably to re-add the library and get rid of the hack.
Would you like to try to submit a PR for it? I'd be happy to assist you if you'd like. Otherwise I'll probably pick this issue up later in the week.