GNOME Bugzilla – Bug 700097
main: Always pass a default stylesheet when constructing the theme
Last modified: 2017-02-27 03:50:40 UTC
See patch, which is a product of https://bugzilla.redhat.com/show_bug.cgi?id=960978.
Created attachment 243807 [details] [review] main: Always pass a default stylesheet when constructing the theme There is not always a clear distinction between code and style, which is why the interface ends up being mostly unusable when we end up without *any* style, for instance because the specified application-stylesheet is corrupt. Setting the default stylesheet in addition to the application-stylesheet is no guarantee for non-default themes not messing up the interface, but it should at least lower the risk ...
Review of attachment 243807 [details] [review]: Makes sense.
Attachment 243807 [details] pushed as 990f683 - main: Always pass a default stylesheet when constructing the theme
The default theme cause that we need to override all properties in a custom theme. As for example: If I create a theme with this style class: .popup-separator-menu-item { -gradient-height: 2px; -gradient-start: rgba(85,85,85,1); -gradient-end: #555555; -margin-horizontal: 1.5em; height: 1em; } Like the shell have this style class in his default theme: .popup-separator-menu-item { height: 1px; margin: 6px 64px; background-color: transparent; border-color: #343a3a; border-bottom-width: 1px; border-bottom-style: solid; } The property margin of the default theme will survive and thats it's not wanted, because the new definition have all that it's needed to show the separator. This create a conflict on both style class, forcing the custom style class to override all properties of the default one... What i considered a moderate behaviour it's do the same but at the style class level, not at the level of the properties of the style class. PLEASE SEE: What could happen, when also there are an error on the default theme? margin: 6px 64px; it's of course an error. 64 it's to much... https://github.com/GNOME/gnome-shell/blob/7dd6b7f04f8619bb766e102802efcd0e41454015/data/theme/gnome-shell.css#L532