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.

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