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.

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