{"action":"created","issue":{"url":"https://api.github.com/repos/linuxmint/Cinnamon/issues/4428","labels_url":"https://api.github.com/repos/linuxmint/Cinnamon/issues/4428/labels{/name}","comments_url":"https://api.github.com/repos/linuxmint/Cinnamon/issues/4428/comments","events_url":"https://api.github.com/repos/linuxmint/Cinnamon/issues/4428/events","html_url":"https://github.com/linuxmint/Cinnamon/issues/4428","id":94455224,"number":4428,"title":"Feature request: unify the behavior of set_style_class_name and add_style_class_name","user":{"login":"lestcape","id":1389572,"avatar_url":"https://avatars.githubusercontent.com/u/1389572?v=3","gravatar_id":"","url":"https://api.github.com/users/lestcape","html_url":"https://github.com/lestcape","followers_url":"https://api.github.com/users/lestcape/followers","following_url":"https://api.github.com/users/lestcape/following{/other_user}","gists_url":"https://api.github.com/users/lestcape/gists{/gist_id}","starred_url":"https://api.github.com/users/lestcape/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lestcape/subscriptions","organizations_url":"https://api.github.com/users/lestcape/orgs","repos_url":"https://api.github.com/users/lestcape/repos","events_url":"https://api.github.com/users/lestcape/events{/privacy}","received_events_url":"https://api.github.com/users/lestcape/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-07-11T09:14:21Z","updated_at":"2015-07-11T13:24:32Z","closed_at":null,"body":"The method that i currently use to insert any external extension inside a cinnamon theme support, is find an appropriate similar selector in the cinnamon stock theme and set this style to my objects, instead of if used for another complete different things. Thats is problematic then.\r\n\r\nI recommend:\r\n\r\nCreate standard selectors for the most common usage, that not include any padding for example, and  set it with set_style_class_name then can be included a more refine one using add_style_class_name for the cinnamon stock themes.\r\n\r\nIn this way, the externals devs can reused the cinnamon standard themes, without any problem and add a more refined one to be used in his particular cases. This will also a big help for the theme authors that currently they want to support externals applets and desklets and also for the externals devs.\r\n\r\nAnyway, there are a more problematic things, that can be easy resolved. When an external development invoke add_style_class_name after used set_style_class_name the add_style_class_name will be omitted, also if there are not a selector in the stock theme. See an example:\r\n\r\ncinnamon.css\r\n.example-selector {\r\n    color: black;\r\n}\r\n.other-selector {\r\n    color: red;\r\n}\r\n\r\nstylesheet.css (the style inside the external applet)\r\n.example-selector {\r\n    color: white;\r\n}\r\n.add_style-selector {\r\n    color: blue;\r\n}\r\n.set_style-selector {\r\n    color: white;\r\n}\r\n\r\nif i do:\r\nactor.set_style_class_name('example-selector') my actor will receive the black color as need to be, because the priority is for the cinnamon theme.\r\n\r\nif I do:\r\nactor.set_style_class_name('set-style-selector') my actor will receive the white color as need to be, because the priority is for the cinnamon theme but not exist a selector in this case and will be used my selector. Excelent!!!\r\n\r\nif I do:\r\nactor.set_style_class_name('example-selector')\r\nactor.set_style_class_name('other-selector')\r\nmy actor will receive the red color as need to be, because the priority is for the last selector in the cinnamon theme. Excellent!!!\r\n\r\nbut if i do:\r\nactor.set_style_class_name('example-selector')\r\nactor.add_style_class_name('add-style-selector')\r\nmy actor will receive the black color, i think this is complete opposite to what externals devs want. The selector add-style-selector need to be override the example-selector in this case, as is not present in the stock theme."},"comment":{"url":"https://api.github.com/repos/linuxmint/Cinnamon/issues/comments/120616860","html_url":"https://github.com/linuxmint/Cinnamon/issues/4428#issuecomment-120616860","issue_url":"https://api.github.com/repos/linuxmint/Cinnamon/issues/4428","id":120616860,"user":{"login":"lestcape","id":1389572,"avatar_url":"https://avatars.githubusercontent.com/u/1389572?v=3","gravatar_id":"","url":"https://api.github.com/users/lestcape","html_url":"https://github.com/lestcape","followers_url":"https://api.github.com/users/lestcape/followers","following_url":"https://api.github.com/users/lestcape/following{/other_user}","gists_url":"https://api.github.com/users/lestcape/gists{/gist_id}","starred_url":"https://api.github.com/users/lestcape/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lestcape/subscriptions","organizations_url":"https://api.github.com/users/lestcape/orgs","repos_url":"https://api.github.com/users/lestcape/repos","events_url":"https://api.github.com/users/lestcape/events{/privacy}","received_events_url":"https://api.github.com/users/lestcape/received_events","type":"User","site_admin":false},"created_at":"2015-07-11T13:24:32Z","updated_at":"2015-07-11T13:24:32Z","body":"@dalcde and what we talk is about the usage, not about the documentation. What we talk is not a contradition with any in the documentation. As how we have two source (css stylesheets). One in the global theme, and another inside the applet (for example). You can say that there are not classes if there are not one in the global css stylesheets, but there are one in the applet stylesheets? I think, in this case add_style class_name need to use the applet stylesheets. What currently occurs is that don't use anything, if there are not in the global theme, they don't see the applet. And i consider this fact a problem, because there are one (in the applet). With  set_style class_name not occurs the same. If there are not a global, they look inside the applet."}}