After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 703250 - CSS - apply text-shadow to symbolic icons
CSS - apply text-shadow to symbolic icons
Status: RESOLVED WONTFIX
Product: gtk+
Classification: Platform
Component: Class: GtkStyleContext
3.9.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2013-06-28 13:40 UTC by Allan Day
Modified: 2014-08-30 04:01 UTC
See Also:
GNOME target: ---
GNOME version: 3.7/3.8


Attachments
Ensure symbolic icons respect the text-shadow CSS property (5.77 KB, patch)
2014-08-23 18:39 UTC, Ikey Doherty
none Details | Review

Description Allan Day 2013-06-28 13:40:13 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.
Comment 1 Paolo Borelli 2013-06-29 09:58:13 UTC
What about simply setting a "symbolic" css class on the element?
Comment 2 Lapo Calamandrei 2013-07-04 12:14:10 UTC
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).
Comment 3 Allan Day 2013-09-19 17:04:57 UTC
(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.
Comment 4 Ikey Doherty 2014-08-23 18:39:47 UTC
Created attachment 284314 [details] [review]
Ensure symbolic icons respect the text-shadow CSS property

This does the trick locally.
Comment 5 Benjamin Otte (Company) 2014-08-26 15:53:27 UTC
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?
Comment 6 Ikey Doherty 2014-08-27 12:54:49 UTC
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.
Comment 7 Matthias Clasen 2014-08-30 04:01:00 UTC
reflecting comment 5