Ambiance & Radiance themes are missing a "background-color" for tooltip elements (needed for GTK3-enabled Firefox Nightly)

Bug #1478173 reported by Daniel Holbert on 2015-07-25
This bug affects 5 people
Affects Status Importance Assigned to Milestone
One Hundred Papercuts
Ubuntu theme
ubuntu-themes (Ubuntu)
Martin Wimpress

Bug Description

Firefox Nightlies recently became GTK3-enabled, and that uncovered an issue with Ubuntu's Ambiance & Radiance GTK3 themes.

They're missing a "background-color" for the .tooltip {...} CSS rule in their config files. They have a "tooltip_bg_color" variable, which they use to set up a background-image (really a gradient), but there's no background-color.

This causes problems for GTK3-enabled Firefox, because it reads back some system-colors by setting up a dummy tooltip and reading the (currently-not-useful) background-color and the foreground-color. Right now, this produces unreadable output (for the user) with white-text-on-a-white-background, as shown in this screenshot:

The solution is simple -- just add this one line to the ".tooltip" CSS rule in gtk-widgets.css:
   background-color: @tooltip_bg_color;

For more details, see bug

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: light-themes 14.04+15.04.20150410-0ubuntu1
ProcVersionSignature: Ubuntu 3.19.0-23.24-generic 3.19.8-ckt2
Uname: Linux 3.19.0-23-generic x86_64
ApportVersion: 2.17.2-0ubuntu1.1
Architecture: amd64
CurrentDesktop: GNOME
Date: Fri Jul 24 17:35:25 2015
EcryptfsInUse: Yes
InstallationDate: Installed on 2015-05-18 (67 days ago)
InstallationMedia: Ubuntu 15.04 "Vivid Vervet" - Release amd64 (20150422)
PackageArchitecture: all
SourcePackage: ubuntu-themes
UpgradeStatus: No upgrade log present (probably fresh install)

Daniel Holbert (dholbert) wrote :
Daniel Holbert (dholbert) wrote :

Steps to reproduce (sorry for not including these up-front):

 1. Download a "Desktop" firefox nightly build from

 2. Extract the tarball, e.g.:
  tar jxvf firefox-42.0a1.en-US.linux-x86_64.tar.bz2

3. From inside the extracted directory, create an empty folder and start Firefox Nightly using that folder as your profile:
   cd firefox
   mkdir /tmp/ffprof; ./firefox -profile /tmp/ffprof -no-remote

 4. (Tell the pop-up dialog no, don't make this your default browser.)

 5. Look at the dropdown notification bar at the top of the browser.

ACTUAL RESULTS: ~white text on ~white background, as shown in screenshot here:

Daniel Holbert (dholbert) wrote :

Note that *actual tooltips* are fine, since they render with the background-image, as specified in gtk-widget.css.

But firefox's notification bars have trouble because they don't get rendered with the full GTK styling. Firefox sets up a dummy widget and styles it as a tooltip, and reads its "background-color" and "color" styling, and assumes that those will be useful. And the problem is that background-color does not currently have a useful value (in that it's basically the same as the foreground color), because these GTK themes reasonably don't expect that they need to provide a background-color, since they're providing a background-image instead.

Daniel Holbert (dholbert) wrote :

Here's a patch to fix this. (generated against source obtained from "apt-get source ubuntu-themes").

I'm hoping someone here can take this & land it. Please let me know if there's anything else that's needed here. Thanks!

Daniel Holbert (dholbert) wrote :

FWIW, I verified that this patch fixes the Firefox issue if I apply it directly to my system, like so:
  cd /usr/share/themes/
  sudo patch -p1 < /tmp/theme-patch.patch

The attachment "patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Changed in ubuntu-themes (Ubuntu):
status: New → Confirmed
Jared Sot (ravefinity) wrote :

I have not had a change to test this on older Ubuntus with the new nightly firefox yet but I can confirm this is a issue with 15.04 & 15.10 . And since when this hits in the latest firefox (that will be shipped on nearly all supported Ubuntu builds) this fix may need to be tested and applied to older and newer builds of Ambaince Themes (EG one in 14.04 , 12.04 etc.) I am not sure yet however.

Changed in hundredpapercuts:
status: New → Confirmed
Changed in ubuntu-themes:
status: New → Confirmed
Changed in ubuntu-themes (Ubuntu):
importance: Undecided → Medium
Changed in hundredpapercuts:
importance: Undecided → Medium
Daniel Holbert (dholbert) wrote :

FWIW, Firefox actually worked around this bug locally by making the bits of firefox-UI in question able to paint the Theme's background gradient (and we're making sure that any future release with GTK3 enabled will include this patch). It may still be worth taking the theme patch that I attached here, but I don't think it'll affect Firefox's behavior anymore.

So, I think this is WORKSFORME. Not sure what the correct launchpad resolution is for that, but I'll let Launchpad folks close out this bug as-appropriate.

Changed in ubuntu-themes (Ubuntu):
assignee: nobody → Martin Wimpress (flexiondotorg)
status: Confirmed → In Progress

I have created the following merge proposal to address this issue:


Changed in ubuntu-themes:
status: Confirmed → In Progress
Travisgevans (travisgevans) wrote :

I disagree with closing this as “WORKSFORME”. Just because core Firefox plastered over the problem does not mean it's not an issue for other cases. I have at least one Firefox add-on that continues to display unreadable text because this bug causes the CSS InfoBackground and InfoText values in styles to result in white-on-white text colors. It will even affect websites that happen to style themselves in these colors (example demo: Who knows what other software might also be affected. I have just tried the patch posted here and can confirm that the issues I describe are definitely caused by this bug.

The themes are clearly broken and should be fixed. An explicit background *and* foreground color should always be specified. There is no guarantee the background image/effect will be used by a given application, and relying on it is only asking for random usability problems.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers