You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

373 lines
7.1 KiB

3 years ago
3 years ago
3 years ago
  1. /*
  2. * see here for theming tutorial
  3. * https://ubuntu-mate.community/t/enabling-the-gtk-inspector-to-find-css-values-for-theme-styles/20150
  4. */
  5. /* CHEATSHEET
  6. *
  7. * MANIPULATE COLORS
  8. *
  9. * mix(color1, color2, number)
  10. * mix(green, red, 0.5)
  11. * lighter(color)
  12. * darker(color)
  13. * shade(color, number)
  14. * alpha(color, number)
  15. * theme label that are descendants of window
  16. * window label {}
  17. * theme entries that are DIRECT children of notebook
  18. * notebook > entry {}
  19. * theme notebooks and anything within
  20. * notebook {}
  21. * theme any widget within a box
  22. * box * {}
  23. * theme any widget named main-entry
  24. * #main-entry
  25. * theme label named title-label
  26. * label#title-label {}
  27. * theme all widgets with the style class 'entry'
  28. * .entry {}
  29. * theme entry of GtkSpinButton
  30. * spinbutton entry {}
  31. * theme labels in the first notebook tab
  32. * notebook tab:first-child label {}
  33. * theme pressed buttons
  34. * button:active {}
  35. * theme buttons with mouse pointer over it
  36. * button:hover {}
  37. * theme insensitive widgets
  38. * *:disabled {}
  39. * theme checkbuttons that are checked
  40. * checkbutton:checked {}
  41. * theme focused labels
  42. * label:focus {}
  43. * theme inconsistent checkbuttons
  44. * checkbutton:indeterminate {}
  45. * SELECTORS
  46. * * any node
  47. * E any node with name E
  48. * E.class any E node with given style class
  49. * E#id any E node with given ID
  50. * E:nth-child({nth-child}) any E node which is the nth child of its parent node
  51. * E:nth-last-child({nth-child}) any E node which is the nth child of its parent node, counting from the end
  52. * E:first-child any E node which is the first child of its parent node
  53. * E:last-child any E node which is the last child of its parent node
  54. * E:only-child any E node which is the only child of its parent node
  55. * E:link, E:visited any E node which represents a hyperlink, not yet visited / visited
  56. * E:active, E:hover, E:focus any E node which is part of a widget with the corresponding state
  57. * E:disabled any E node which is part of a widget which is disabled
  58. * E:checked any E node which is part of a widget (e.g. radio of checkbutton) which is checked
  59. * E:indeterminate any E node which is part of a widget (e.g. radio or checkbutton) which is in an indeterminate state
  60. * E:backdrop, E:selected any E node which is part of a widget with the corresponding state
  61. * E:not({selector}) any E node which does not match the simple selector
  62. * E:dir(ltr), E:dir(rtl) any E node that has the corresponding text direction
  63. * E:drop(active) any E node that is an active drop target for a current DND operation
  64. * E F any F node which is a descendent of an E node
  65. * E > F any F node which is a child of an E node
  66. * E ~ F any F node which is preceded by an E node
  67. * E + F any F node which is immediately preceded by an E node
  68. * APPS
  69. *
  70. * Thunar .thunar
  71. * transmission-gtk .tr-workarea
  72. */
  73. /*************
  74. * base states
  75. *************/
  76. * {
  77. color: @fg_color;
  78. background: @bg_color;
  79. }
  80. selection,
  81. *:selected:selected,
  82. *:selected:focus {
  83. background: @acc1_color;
  84. color: @bg_color;
  85. }
  86. *:hover {
  87. color: @acc1_color;
  88. background: @bg_color;
  89. }
  90. *.progressbar {
  91. background: darker(@acc1_color);
  92. }
  93. treeview:hover {
  94. color: @acc1_color;
  95. background: @bg_color;
  96. }
  97. /* transmission-gtk needs a different approach */
  98. .tr-workarea treeview:hover {
  99. background: @acc1_color;
  100. color: @bg_color; /* only working when hovering over a selected row */
  101. }
  102. .tr-workarea treeview.view:disabled {
  103. color: mix(@fg_color, @bg_color, 0.5);
  104. }
  105. treeview:selected {
  106. color: @bg_color;
  107. background: @acc1_color;
  108. }
  109. treeview.progressbar:hover,
  110. treeview.progressbar:selected {
  111. background: darker(@acc1_color);
  112. }
  113. /* trough is the empty area in the progress bar */
  114. progressbar trough,
  115. treeview.view.trough {
  116. background: @bg_color;
  117. }
  118. menuitem:hover > label {
  119. color: @acc1_color;
  120. }
  121. /* accelerator is the hotkey, e.g. ctrl+q */
  122. menuitem:disabled > label,
  123. menuitem:disabled accelerator {
  124. color: mix(@fg_color, @bg_color, 0.5);
  125. }
  126. button:hover label,
  127. button:focus label,
  128. switch:hover slider,
  129. switch:focus slider {
  130. color: @acc1_color;
  131. }
  132. /*
  133. menu {
  134. background: @bg_color;
  135. padding: 0.4em 0.4em;
  136. }
  137. menu menuitem {
  138. background: @bg_color;
  139. color: @fg_color;
  140. padding: 0.4em;
  141. margin: 1px;
  142. }
  143. menuitem:hover {
  144. background: @acc1_color;
  145. color: @bg_color;
  146. }
  147. menuitem:hover > *,
  148. combobox menuitem:hover * {
  149. color: @bg_color;
  150. }
  151. */
  152. /*
  153. * NEEDS TO BE INTEGRATED!
  154. *:backdrop:backdrop,
  155. *:disabled:disabled {
  156. color: mix(@fg_color, @bg_color, 0.4);
  157. -gtk-icon-effect: dim;
  158. }
  159. box {
  160. background: @bg_color;
  161. color: @fg_color;
  162. }
  163. label {
  164. color: @fg_color;
  165. }
  166. entry {
  167. padding: 3px;
  168. border-width: 1px;
  169. background-color: @bg_color;
  170. color: @fg_color;
  171. }
  172. entry:backdrop,
  173. entry:disabled {
  174. background: shade(@bg_color, 0.94);
  175. }
  176. slider:focus,
  177. switch:focus slider,
  178. spinbutton:focus,
  179. notebook:focus tab:checked,
  180. radio:focus,
  181. check:focus,
  182. entry:focus,
  183. button:focus {
  184. border-color: @acc2_color;
  185. }
  186. switch:checked {
  187. background: @acc1_color;
  188. color: @bg_color;
  189. }
  190. switch {
  191. background: @acc1_color;
  192. color: @bg_color;
  193. }
  194. button,
  195. switch slider {
  196. background: @bg_color;
  197. color: @fg_color;
  198. border-radius: 0px;
  199. padding: 1px;
  200. border-width: 0px;
  201. border-color: transparent;
  202. }
  203. combobox {
  204. border-color: #00ff00;
  205. color: #ff0000;
  206. box-shadow: #0000ff;
  207. }
  208. button.flat {
  209. background: none;
  210. border-color: transparent;
  211. }
  212. button:hover,
  213. button:focus,
  214. switch:hover slider,
  215. switch:focus slider {
  216. }
  217. button:backdrop,
  218. button:disabled,
  219. switch:backdrop slider,
  220. switch:disabled slider {
  221. background: @bg_color;
  222. }
  223. radio,
  224. check {
  225. background-color: @bg_color;
  226. border-color: @fg_color;
  227. }
  228. radio:hover,
  229. check:hover {
  230. border-color: @fg_color;
  231. color: @fg_color;
  232. }
  233. headerbar {
  234. color: @fg_color;
  235. background: @bg_color;
  236. }
  237. list {
  238. background: @bg_color;
  239. color: @fg_color;
  240. }
  241. menubar,
  242. actionbar,
  243. toolbar,
  244. placessidebar list {
  245. background: @bg_color;
  246. color: @fg_color;
  247. }
  248. toolbar {
  249. padding: 1px;
  250. }
  251. actionbar {
  252. padding: 0.5em;
  253. border-top-width: 1px;
  254. }
  255. .inline-toolbar {
  256. padding: 0.5em;
  257. border-width: 0 1px 1px;
  258. }
  259. actionbar button,
  260. toolbar button {
  261. padding: 3px;
  262. }
  263. menu separator {
  264. background-color: @acc2_color;
  265. margin: 0.2em;
  266. min-width: 1px;
  267. min-height: 1px;
  268. }
  269. notebook,
  270. notebook tab:checked {
  271. background: @acc1_color;
  272. color: @bg_color;
  273. }
  274. notebook tab,
  275. notebook header {
  276. background: @bg_color;
  277. }
  278. notebook tab:active {
  279. background-color: #ff0000;
  280. }
  281. popover.background,
  282. toolbar.osd {
  283. background: #ff0000;
  284. }
  285. popover modelbutton {
  286. background: #00ff00;
  287. }
  288. popover modelbutton:hover {
  289. background: #0000ff;
  290. }
  291. * {
  292. outline-color: #0000ff;
  293. outline-style: solid;
  294. outline-offset: 0px;
  295. outline-width: 0px;
  296. -gtk-outline-radius: 0px;
  297. }
  298. */