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.

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