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.

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