GNOME Bugzilla – Bug 703250
CSS - apply text-shadow to symbolic icons
Last modified: 2014-08-30 04:01:00 UTC
It's often advantageous to add a shadow to symbolic icons. However, you never want to add one to a full colour icon. Right now, setting the icon-shadow property in CSS themes applies to both symbolic and full colour icons, meaning that we are unable to use the feature. This bug also has the problem that it means that text labels using text-shadow look inconsistent from symbolic icons.
What about simply setting a "symbolic" css class on the element?
theming wise the most convenient way would be to have text-shadow property working on symbolic icons as well (as symbolic are treated like text at the end of the day). The symbolic class on the gtkImage would do as well, I think it should automagically be added btw and only when the icon is actually symbolic (read, the icon is found so it doesn't fallback to the normal one).
(In reply to comment #2) > theming wise the most convenient way would be to have text-shadow property > working on symbolic icons as well Makes sense.
Created attachment 284314 [details] [review] Ensure symbolic icons respect the text-shadow CSS property This does the trick locally.
I don't like this whole approach. I don't like: * Using text-shadow We have a property for shadows on icons, it's called icon-shadow. We should use that one. * Using text-shadow for symbolic icons only That's really really twisted. "Your icon will get a shadow from the icon-shadow property. Unless it's symbolic, then it might get a shadow from the text-shadow property". Nope. * Trying to set style classes based on icon type This is the wrong way around. The theme should decide if icons are symbolic or not (via the -gtk-icon-style CSS property), not the apps. So in every case, the theme knows without the help from style classes if an icon is symbolic and can therefore decide if it wants to apply shadows or not. * Having some icons with shadows and others without There should be a clear definition if icons come with shadows or shadows are applied later. Like, full-color icons have shadows but symbolics don't? Why is that a good idea? I would close this bug as WONTFIX and instead rely on themes using -gtk-icon-style and icon-shadow. Unless I'm missing something and there are valid use cases where the app should have the option to choose either a symbolic or a full-color icon?
Fair do - patch was merely submitted to trim bug count :) If a valid solution for GNOME already exists in recent GTK+ versions then this patch is redundant.
reflecting comment 5