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.

416 lines
7.7 KiB

3 years ago
3 years ago
3 years ago
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. radio:checked {
  128. color: @acc1_color;
  129. background: @acc1_color;
  130. }
  131. radio,
  132. radio:hover {
  133. background: mix(@fg_color, @bg_color, 0.5);
  134. }
  135. button {
  136. border-radius: 0px;
  137. box-shadow: none;
  138. text-shadow: none;
  139. }
  140. scale {
  141. background: @bg_color;
  142. }
  143. scale trough *,
  144. scale:hover trough * {
  145. background: @acc1_color;
  146. }
  147. scale trough,
  148. scale:hover trough {
  149. background: mix(@fg_color, @bg_color, 0.5);
  150. }
  151. button:hover label,
  152. button:focus label,
  153. switch:hover slider,
  154. switch:focus slider {
  155. color: @acc1_color;
  156. }
  157. combobox menuitem:hover * {
  158. color: @acc1_color;
  159. }
  160. /*
  161. combobox button {
  162. color: @fg_color;
  163. text-shadow: none;
  164. }
  165. */
  166. /*
  167. menu {
  168. background: @bg_color;
  169. padding: 0.4em 0.4em;
  170. }
  171. menu menuitem {
  172. background: @bg_color;
  173. color: @fg_color;
  174. padding: 0.4em;
  175. margin: 1px;
  176. }
  177. menuitem:hover {
  178. background: @acc1_color;
  179. color: @bg_color;
  180. }
  181. menuitem:hover > *,
  182. combobox menuitem:hover * {
  183. color: @bg_color;
  184. }
  185. */
  186. /*
  187. * NEEDS TO BE INTEGRATED!
  188. *:backdrop:backdrop,
  189. *:disabled:disabled {
  190. color: mix(@fg_color, @bg_color, 0.4);
  191. -gtk-icon-effect: dim;
  192. }
  193. box {
  194. background: @bg_color;
  195. color: @fg_color;
  196. }
  197. label {
  198. color: @fg_color;
  199. }
  200. entry {
  201. padding: 3px;
  202. border-width: 1px;
  203. background-color: @bg_color;
  204. color: @fg_color;
  205. }
  206. entry:backdrop,
  207. entry:disabled {
  208. background: shade(@bg_color, 0.94);
  209. }
  210. slider:focus,
  211. switch:focus slider,
  212. spinbutton:focus,
  213. notebook:focus tab:checked,
  214. radio:focus,
  215. check:focus,
  216. entry:focus,
  217. button:focus {
  218. border-color: @acc2_color;
  219. }
  220. switch:checked {
  221. background: @acc1_color;
  222. color: @bg_color;
  223. }
  224. switch {
  225. background: @acc1_color;
  226. color: @bg_color;
  227. }
  228. button,
  229. switch slider {
  230. background: @bg_color;
  231. color: @fg_color;
  232. border-radius: 0px;
  233. padding: 1px;
  234. border-width: 0px;
  235. border-color: transparent;
  236. }
  237. combobox {
  238. border-color: #00ff00;
  239. color: #ff0000;
  240. box-shadow: #0000ff;
  241. }
  242. button.flat {
  243. background: none;
  244. border-color: transparent;
  245. }
  246. button:hover,
  247. button:focus,
  248. switch:hover slider,
  249. switch:focus slider {
  250. }
  251. button:backdrop,
  252. button:disabled,
  253. switch:backdrop slider,
  254. switch:disabled slider {
  255. background: @bg_color;
  256. }
  257. radio,
  258. check {
  259. background-color: @bg_color;
  260. border-color: @fg_color;
  261. }
  262. radio:hover,
  263. check:hover {
  264. border-color: @fg_color;
  265. color: @fg_color;
  266. }
  267. headerbar {
  268. color: @fg_color;
  269. background: @bg_color;
  270. }
  271. list {
  272. background: @bg_color;
  273. color: @fg_color;
  274. }
  275. menubar,
  276. actionbar,
  277. toolbar,
  278. placessidebar list {
  279. background: @bg_color;
  280. color: @fg_color;
  281. }
  282. toolbar {
  283. padding: 1px;
  284. }
  285. actionbar {
  286. padding: 0.5em;
  287. border-top-width: 1px;
  288. }
  289. .inline-toolbar {
  290. padding: 0.5em;
  291. border-width: 0 1px 1px;
  292. }
  293. actionbar button,
  294. toolbar button {
  295. padding: 3px;
  296. }
  297. menu separator {
  298. background-color: @acc2_color;
  299. margin: 0.2em;
  300. min-width: 1px;
  301. min-height: 1px;
  302. }
  303. notebook,
  304. notebook tab:checked {
  305. background: @acc1_color;
  306. color: @bg_color;
  307. }
  308. notebook tab,
  309. notebook header {
  310. background: @bg_color;
  311. }
  312. notebook tab:active {
  313. background-color: #ff0000;
  314. }
  315. popover.background,
  316. toolbar.osd {
  317. background: #ff0000;
  318. }
  319. popover modelbutton {
  320. background: #00ff00;
  321. }
  322. popover modelbutton:hover {
  323. background: #0000ff;
  324. }
  325. * {
  326. outline-color: #0000ff;
  327. outline-style: solid;
  328. outline-offset: 0px;
  329. outline-width: 0px;
  330. -gtk-outline-radius: 0px;
  331. }
  332. */