#36312: dark_mode.css has invalid size units for svg
-----------------------------------+--------------------------------------
     Reporter:  Christian Wiegand  |                    Owner:  cwiegand
         Type:  Bug                |                   Status:  closed
    Component:  contrib.admin      |                  Version:  5.2
     Severity:  Normal             |               Resolution:  needsinfo
     Keywords:  admin css          |             Triage Stage:  Unreviewed
    Has patch:  0                  |      Needs documentation:  0
  Needs tests:  0                  |  Patch needs improvement:  0
Easy pickings:  0                  |                    UI/UX:  0
-----------------------------------+--------------------------------------
Comment (by Christian Wiegand):

 Hi Natalia, thanks for looking into that. The issue is easy to reproduce
 as long you have access to a Mac computer. I'm observing this issue since
 about 1.5 to two years.

 If you open any Django App in Safari, goto Django admin and open the
 javascript console. It shows the error messages described above, no
 conditions. It's always there in the admin since the dark mode was
 introduced for Django admin. I attached an image of the javascript console
 to the issue.

 The error messages are gone as soon as I replace the "1.5rem" size units
 with "24px" in the above quoted css code. Thought about providing a PR but
 then I read some articles that this maybe an error in Safari. Although
 there are hints around the net that generally SVG doesn't support "rem" or
 "em" units (since the dimensions in svg are a little more complex). As far
 as I learned  SVG can only be sized in rem via the font-size css statement
 (and yes, I'm now 64 and retired, so my knowledge on svg graphics maybe
 stale ;-)). At least stated here:
 https://stackoverflow.com/questions/10325070/svg-translate-with-em-as-unit
 and here: https://www.w3.org/TR/SVG/coords.html#Units.

 Anyway, I would be able to stand the error messages, so nothing really
 critical. Even if not being fixed, it would be nice to document here, so
 any other people worrying about the messages can follow the arguments.

 Thans, Christian
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36312#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/0107019620e1cac7-957beab0-9bcb-4f93-8fa7-0ae4039cd190-000000%40eu-central-1.amazonses.com.

Reply via email to