Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#28508 closed Bug (fixed)

Error views set background-color but not foreground color

Reported by: John Dallahan Owned by: Darius Azimi
Component: Error reporting Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: yes

Description

CSRF error pages and 404 pages do not set the text color in their inline styles, but they set background-color, making it annoying to view them with dark GTK themes. Relevant lines:
https://github.com/django/django/blob/master/django/views/templates/technical_404.html#L11
https://github.com/django/django/blob/master/django/views/csrf.py#L26
The 500 page does have it set, though:
https://github.com/django/django/blob/master/django/views/templates/technical_500.html#L12

Attachments (1)

Screen Shot 2017-08-19 at 14.58.43.png (36.3 KB ) - added by John Dallahan 7 years ago.
What the page looks like in my browser

Download all attachments as: .zip

Change History (7)

by John Dallahan, 7 years ago

What the page looks like in my browser

comment:1 by Claude Paroz, 7 years ago

Component: UncategorizedCore (Other)
Easy pickings: set
Triage Stage: UnreviewedAccepted

in reply to:  description comment:2 by Darius Azimi, 7 years ago

Owner: changed from nobody to Darius Azimi
Status: newassigned

To make sure I understand it correctly, using the same text and background from technical_500 on other pages of csrf and technical_404 would correct this issue?

Replying to John Dallahan:

CSRF error pages and 404 pages do not set the text color in their inline styles, but they set background-color, making it annoying to view them with dark GTK themes. Relevant lines:
https://github.com/django/django/blob/master/django/views/templates/technical_404.html#L11
https://github.com/django/django/blob/master/django/views/csrf.py#L26
The 500 page does have it set, though:
https://github.com/django/django/blob/master/django/views/templates/technical_500.html#L12

comment:3 by John Dallahan, 7 years ago

Yes, that should fix the issue. I recommend using a common template which is extended by error views, though.

comment:4 by Abhishek, 7 years ago

this ticket needs review

comment:5 by Tim Graham <timograham@…>, 7 years ago

Resolution: fixed
Status: assignedclosed

In 347551c2:

Fixed #28508 -- Set the foreground color to black in CSRF and 404 error templates.

comment:6 by Tim Graham, 7 years ago

Component: Core (Other)Error reporting
Summary: Error views set background-color bot not foreground colorError views set background-color but not foreground color
Note: See TracTickets for help on using tickets.
Back to Top