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 700097 - main: Always pass a default stylesheet when constructing the theme
main: Always pass a default stylesheet when constructing the theme
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2013-05-10 17:29 UTC by Florian Müllner
Modified: 2017-02-27 03:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
main: Always pass a default stylesheet when constructing the theme (1.33 KB, patch)
2013-05-10 17:29 UTC, Florian Müllner
committed Details | Review

Description Florian Müllner 2013-05-10 17:29:15 UTC
See patch, which is a product of https://bugzilla.redhat.com/show_bug.cgi?id=960978.
Comment 1 Florian Müllner 2013-05-10 17:29:18 UTC
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 ...
Comment 2 Jasper St. Pierre (not reading bugmail) 2013-05-10 17:31:53 UTC
Review of attachment 243807 [details] [review]:

Makes sense.
Comment 3 Florian Müllner 2013-05-10 17:42:20 UTC
Attachment 243807 [details] pushed as 990f683 - main: Always pass a default stylesheet when constructing the theme
Comment 4 Lester Carballo 2017-02-27 03:50:40 UTC
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