Modify

Opened 7 years ago

Last modified 5 years ago

#2303 new defect

User-specific background colours for inline diffs (to support colourblind)

Reported by: kriegaex Owned by: anybody
Priority: normal Component: Request-a-Hack
Severity: minor Keywords: diff, colour, CSS
Cc: Trac Release: 0.10

Description

I suffer from a slight red-green colourblindness. I rarely notice it, because I recognise most reds and greens. The light red and green in inline diff backgrounds, though, are hardly discernible for me. Well, I can change the red to a darker shade, so the brightness is different for both colours, making it easier for me to really recognise red as red and differentiate it from the light green for added lines.

The thing is that most other users do not like this and that the contrast to the darker red for changed characters within one line becomes weaker.

My question is: Is there any way I can tweak Trac into making those colours user-configurable? I would even welcome hacky ways of doing it, e.g. setting a local cookie or something. An option for changing the settings or switching a toggle in the user profile would be even nicer.

I do not need theming, just a little customisation tip. It is nice that I can override CSS formatting globally, but doing it in a user-specific way is something else which does not seem to be supported out of the box. I might be wrong, though, because I am a Trac newbie.

Attachments (0)

Change History (3)

comment:1 Changed 6 years ago by martin_s

You could use multiple alternative CSS style files which can be added using the AddHeadersPlugin or use a browser which allows you to override site specific CSS settings.

comment:2 Changed 6 years ago by kriegaex

I solved the problem then via local CSS override. It works in Firefox as well as IE and Opera, it is just a bit hard to find in each browser, because the customisation is different in each of them.

What I basically did, was put this code into userContent.css (for Firefox):

table.inline tbody.mod td.l, table.inline tbody.rem td.l { background: #fbb !important }

The same code goes into the corresponding CSS files for IE and Opera.

comment:3 Changed 5 years ago by rjollos

  • Summary changed from User-specific background colours for inline diffs to User-specific background colours for inline diffs (to support colourblind)

Add Comment

Modify Ticket

Action
as new The owner will remain anybody.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.