Problem with rulers on dark theme

I have Gnome on a dark theme, and the rulers become illegible (black on black).

I searched online and found several suggestions, many that helped, but none fixed the rulers.

  • Personalization>Firefox themes only changes the background of the menu, that was already ok.
  • Accessibility>“Automatic detect high contrast mode of operating system” changed some invisible toolbar icons, leaves the grayed ones invisible but the active ones look fine.
  • Apperance>“Application Background” affects nothing outside the unused area on the program.

Any ideas?

This is likely bug fdo#50296.