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.

424 lines
7.8 KiB

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