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.

379 lines
7.2 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. border-color:@bg_color;
  80. }
  81. selection,
  82. *:selected:selected,
  83. *:selected:focus {
  84. background: @acc1_color;
  85. color: @bg_color;
  86. }
  87. *:hover {
  88. color: @acc1_color;
  89. background: @bg_color;
  90. }
  91. *.progressbar {
  92. background: darker(@acc1_color);
  93. }
  94. treeview:hover {
  95. color: @acc1_color;
  96. background: @bg_color;
  97. }
  98. /* transmission-gtk needs a different approach */
  99. .tr-workarea treeview:hover {
  100. background: @acc1_color;
  101. color: @bg_color; /* only working when hovering over a selected row */
  102. }
  103. .tr-workarea treeview.view:disabled {
  104. color: mix(@fg_color, @bg_color, 0.5);
  105. }
  106. treeview:selected {
  107. color: @bg_color;
  108. background: @acc1_color;
  109. }
  110. treeview.progressbar:hover,
  111. treeview.progressbar:selected {
  112. background: darker(@acc1_color);
  113. }
  114. /* trough is the empty area in the progress bar */
  115. progressbar trough,
  116. treeview.view.trough {
  117. background: @bg_color;
  118. }
  119. menuitem:hover > label {
  120. color: @acc1_color;
  121. }
  122. /* accelerator is the hotkey, e.g. ctrl+q */
  123. menuitem:disabled > label,
  124. menuitem:disabled accelerator {
  125. color: mix(@fg_color, @bg_color, 0.5);
  126. }
  127. button {
  128. border-radius: 0px;
  129. box-shadow: none;
  130. }
  131. button:hover label,
  132. button:focus label,
  133. switch:hover slider,
  134. switch:focus slider {
  135. color: @acc1_color;
  136. }
  137. /*
  138. menu {
  139. background: @bg_color;
  140. padding: 0.4em 0.4em;
  141. }
  142. menu menuitem {
  143. background: @bg_color;
  144. color: @fg_color;
  145. padding: 0.4em;
  146. margin: 1px;
  147. }
  148. menuitem:hover {
  149. background: @acc1_color;
  150. color: @bg_color;
  151. }
  152. menuitem:hover > *,
  153. combobox menuitem:hover * {
  154. color: @bg_color;
  155. }
  156. */
  157. /*
  158. * NEEDS TO BE INTEGRATED!
  159. *:backdrop:backdrop,
  160. *:disabled:disabled {
  161. color: mix(@fg_color, @bg_color, 0.4);
  162. -gtk-icon-effect: dim;
  163. }
  164. box {
  165. background: @bg_color;
  166. color: @fg_color;
  167. }
  168. label {
  169. color: @fg_color;
  170. }
  171. entry {
  172. padding: 3px;
  173. border-width: 1px;
  174. background-color: @bg_color;
  175. color: @fg_color;
  176. }
  177. entry:backdrop,
  178. entry:disabled {
  179. background: shade(@bg_color, 0.94);
  180. }
  181. slider:focus,
  182. switch:focus slider,
  183. spinbutton:focus,
  184. notebook:focus tab:checked,
  185. radio:focus,
  186. check:focus,
  187. entry:focus,
  188. button:focus {
  189. border-color: @acc2_color;
  190. }
  191. switch:checked {
  192. background: @acc1_color;
  193. color: @bg_color;
  194. }
  195. switch {
  196. background: @acc1_color;
  197. color: @bg_color;
  198. }
  199. button,
  200. switch slider {
  201. background: @bg_color;
  202. color: @fg_color;
  203. border-radius: 0px;
  204. padding: 1px;
  205. border-width: 0px;
  206. border-color: transparent;
  207. }
  208. combobox {
  209. border-color: #00ff00;
  210. color: #ff0000;
  211. box-shadow: #0000ff;
  212. }
  213. button.flat {
  214. background: none;
  215. border-color: transparent;
  216. }
  217. button:hover,
  218. button:focus,
  219. switch:hover slider,
  220. switch:focus slider {
  221. }
  222. button:backdrop,
  223. button:disabled,
  224. switch:backdrop slider,
  225. switch:disabled slider {
  226. background: @bg_color;
  227. }
  228. radio,
  229. check {
  230. background-color: @bg_color;
  231. border-color: @fg_color;
  232. }
  233. radio:hover,
  234. check:hover {
  235. border-color: @fg_color;
  236. color: @fg_color;
  237. }
  238. headerbar {
  239. color: @fg_color;
  240. background: @bg_color;
  241. }
  242. list {
  243. background: @bg_color;
  244. color: @fg_color;
  245. }
  246. menubar,
  247. actionbar,
  248. toolbar,
  249. placessidebar list {
  250. background: @bg_color;
  251. color: @fg_color;
  252. }
  253. toolbar {
  254. padding: 1px;
  255. }
  256. actionbar {
  257. padding: 0.5em;
  258. border-top-width: 1px;
  259. }
  260. .inline-toolbar {
  261. padding: 0.5em;
  262. border-width: 0 1px 1px;
  263. }
  264. actionbar button,
  265. toolbar button {
  266. padding: 3px;
  267. }
  268. menu separator {
  269. background-color: @acc2_color;
  270. margin: 0.2em;
  271. min-width: 1px;
  272. min-height: 1px;
  273. }
  274. notebook,
  275. notebook tab:checked {
  276. background: @acc1_color;
  277. color: @bg_color;
  278. }
  279. notebook tab,
  280. notebook header {
  281. background: @bg_color;
  282. }
  283. notebook tab:active {
  284. background-color: #ff0000;
  285. }
  286. popover.background,
  287. toolbar.osd {
  288. background: #ff0000;
  289. }
  290. popover modelbutton {
  291. background: #00ff00;
  292. }
  293. popover modelbutton:hover {
  294. background: #0000ff;
  295. }
  296. * {
  297. outline-color: #0000ff;
  298. outline-style: solid;
  299. outline-offset: 0px;
  300. outline-width: 0px;
  301. -gtk-outline-radius: 0px;
  302. }
  303. */