not really known
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.

587 lines
12 KiB

  1. // recess: ignore
  2. @toolbar-grey: #282828;
  3. @button-grey: #808080;
  4. @panel-grey: #C0C0C0;
  5. @text-field-grey: #E5E5E5;
  6. @link-blue: #0076C3;
  7. @line-width: 2px;
  8. @cell-size: 5 * @subcell-size;
  9. @font-size: 10pt;
  10. @toolbar-height: @cell-size;
  11. @icon-small-size: 2 * @subcell-size;
  12. @toolbutton-size: @toolbar-height - (4 * @line-width);
  13. @toolbar-button-margin-top: (@toolbar-height / 2) - (2 * @line-width) -
  14. (@icon-small-size / 2);
  15. @input-text-padding: (2 * @line-width);
  16. @input-text-line-height: 2 * @subcell-size;
  17. @input-text-width: 3 * @cell-size;
  18. @toolbar-input-height: (@toolbar-height / 2) - (@input-text-line-height / 2) -
  19. (@input-text-padding + @line-width);
  20. @button-small-size: @input-text-line-height + (2 * @input-text-padding) +
  21. (2 * @line-width);
  22. html {
  23. height: 100%;
  24. -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  25. }
  26. body {
  27. position: relative;
  28. height: 100%;
  29. margin: 0;
  30. font-family: sans-serif;
  31. font-size: @font-size;
  32. background-color: @panel-grey;
  33. }
  34. .unselectable {
  35. -webkit-user-select: none;
  36. -moz-user-select: none;
  37. }
  38. .pull-right {
  39. float: right;
  40. }
  41. a {
  42. color: @link-blue;
  43. text-decoration: none;
  44. }
  45. /* Toolbar */
  46. .toolbar {
  47. height: @toolbar-height;
  48. padding: 0 @toolbutton-size + (5 * @line-width);
  49. color: white;
  50. background-color: @toolbar-grey;
  51. .unselectable;
  52. }
  53. /* Toolbar separator */
  54. .toolbar hr {
  55. display: inline-block;
  56. height: 3 * @subcell-size;
  57. margin: (@subcell-size - (@line-width * 3)) / 2;
  58. margin-bottom: -1 * (@subcell-size + (@line-width * 3));
  59. border: (@line-width / 2) solid @button-grey;
  60. }
  61. /* Toolbar toolbutton */
  62. .toolbar .toolbutton {
  63. position: relative;
  64. width: @toolbutton-size;
  65. height: @toolbutton-size;
  66. margin: (2 * @line-width) @line-width;
  67. color: white;
  68. color: transparent;
  69. background-color: transparent;
  70. background-position: center;
  71. background-repeat: no-repeat;
  72. background-size: contain;
  73. border: 0;
  74. border-radius: @subcell-size / 2;
  75. }
  76. .toolbar .toolbutton:hover {
  77. background-color: black;
  78. }
  79. .toolbar .toolbutton:active, .toolbar .toolbutton.active {
  80. background-color: @button-grey;
  81. }
  82. .toolbar .toolbutton img {
  83. width: 100%;
  84. height: 100%;
  85. }
  86. .toolbar .toolbutton:before {
  87. position: absolute;
  88. right: -2 * @line-width;
  89. bottom: -2 * @line-width;
  90. display: block;
  91. width: @cell-size;
  92. height: @subcell-size;
  93. background-color: transparent;
  94. content: "";
  95. }
  96. .toolbar .toolbutton.invoker:before {
  97. background-image: url('../icons/emblems/arrow-down.svg');
  98. }
  99. .toolbar #stop-button {
  100. background-image: url('../icons/actions/activity-stop.svg');
  101. }
  102. /* Canvas */
  103. #canvas {
  104. position: absolute;
  105. top: @toolbar-height;
  106. bottom: 0;
  107. width: 100%;
  108. overflow-y: auto;
  109. color: black;
  110. background-color: @panel-grey;
  111. }
  112. /* Button */
  113. button {
  114. padding: @line-width (2 * @line-width);
  115. line-height: @icon-small-size;
  116. color: white;
  117. background-color: @button-grey;
  118. border: @line-width solid transparent;
  119. border-radius: 2 * @subcell-size;
  120. .unselectable;
  121. }
  122. button:hover {
  123. background-color: @button-grey + #222;
  124. border-color: @button-grey + #222;
  125. }
  126. button:active {
  127. color: black;
  128. background-color: white;
  129. border-color: @button-grey;
  130. }
  131. button:focus {
  132. border-color: white;
  133. }
  134. .toolbar button {
  135. margin-top: @toolbar-button-margin-top;
  136. }
  137. /* Button with icon */
  138. button.icon {
  139. position: relative;
  140. padding-left: @icon-small-size + (2 * @line-width);
  141. }
  142. button.icon span.ok {
  143. background-image: url(../icons/actions/dialog-ok.svg);
  144. }
  145. button.icon:active span.ok {
  146. background-image: url(../icons/actions/dialog-ok-active.svg);
  147. }
  148. button.icon span.cancel {
  149. background-image: url(../icons/actions/dialog-cancel.svg);
  150. }
  151. button.icon:active span.cancel {
  152. background-image: url(../icons/actions/dialog-cancel-active.svg);
  153. }
  154. button.icon span {
  155. position: absolute;
  156. display: inline-block;
  157. width: @icon-small-size;
  158. height: @icon-small-size;
  159. background-color: transparent;
  160. background-position: center;
  161. background-repeat: no-repeat;
  162. background-size: @icon-small-size @icon-small-size;
  163. }
  164. button.icon span {
  165. top: @line-width;
  166. left: @line-width;
  167. }
  168. /* One line text input */
  169. input[type='text'] {
  170. width: @input-text-width;
  171. padding: @input-text-padding;
  172. line-height: @input-text-line-height;
  173. background-color: @text-field-grey;
  174. border: @line-width solid @text-field-grey;
  175. border-radius: 2 * @subcell-size;
  176. outline: 0;
  177. }
  178. input[type='text']:focus {
  179. background-color: white;
  180. }
  181. input[type='text']:disabled {
  182. background-color: @button-grey;
  183. border-color: @button-grey;
  184. }
  185. .toolbar input[type='text'], .palette .row input[type='text'] {
  186. margin-top: @toolbar-input-height;
  187. }
  188. .palette .row input[type='text']:nth-last-child(1) {
  189. margin-top: @toolbar-input-height - @line-width;
  190. }
  191. input[type='text'].expand {
  192. width: calc(~"100%" - (2 * @input-text-padding + 2 * @line-width));
  193. }
  194. /* One line text input with buttons inside */
  195. .icon-input {
  196. position: relative;
  197. display: inline-block;
  198. }
  199. .icon-input input[type='text'] {
  200. width: @input-text-width + @input-text-padding - @button-small-size;
  201. padding-right: @button-small-size;
  202. }
  203. .icon-input.expand {
  204. width: 100%;
  205. }
  206. .icon-input.expand input[type='text'] {
  207. width: calc(~"100%" - (@input-text-padding + 2 * @line-width +
  208. @button-small-size));
  209. }
  210. .icon-input button {
  211. position: absolute;
  212. width: @button-small-size;
  213. height: @button-small-size;
  214. padding: 0;
  215. background-size: @icon-small-size @icon-small-size;
  216. }
  217. .icon-input button.right {
  218. right: 0;
  219. margin: 0 0 0 -@button-small-size;
  220. border-radius: 0 (2 * @subcell-size) (2 * @subcell-size) 0;
  221. }
  222. .icon-input button {
  223. background-color: transparent;
  224. background-position: center;
  225. background-repeat: no-repeat;
  226. border: 0;
  227. }
  228. .icon-input button {
  229. top: @line-width;
  230. }
  231. .toolbar .icon-input button:hover {
  232. background-color: transparent;
  233. }
  234. .toolbar .icon-input button {
  235. top: @toolbar-input-height;
  236. }
  237. button.cancel {
  238. background-image: url(../icons/actions/entry-cancel.svg);
  239. }
  240. button.cancel:active {
  241. background-image: url(../icons/actions/entry-cancel-active.svg);
  242. }
  243. button.cancel:disabled {
  244. background-image: url(../icons/actions/entry-cancel-disabled.svg);
  245. }
  246. /* Slider */
  247. /* FIXME this is not fully Sugarized yet */
  248. input[type='range'] {
  249. height: @subcell-size;
  250. cursor: pointer;
  251. background-color: @button-grey;
  252. border-radius: 2 * @subcell-size;
  253. -webkit-appearance: none !important;
  254. }
  255. input[type='range']::-webkit-slider-thumb {
  256. width: @icon-small-size;
  257. height: @icon-small-size;
  258. background-color: @panel-grey;
  259. border: (2 * @line-width) solid @button-grey;
  260. border-radius: @subcell-size;
  261. -webkit-appearance: none !important;
  262. }
  263. input[type='range']::-webkit-slider-thumb:hover {
  264. background-color: @panel-grey + #222;
  265. border-color: @button-grey + #222;
  266. }
  267. .toolbar input[type='range'] {
  268. margin-top: (@toolbar-height / 2) - (@subcell-size / 2);
  269. }
  270. /* Label */
  271. label {
  272. .unselectable;
  273. }
  274. /* Palette */
  275. .palette {
  276. position: absolute;
  277. color: white;
  278. pointer-events: none;
  279. background-color: transparent;
  280. }
  281. .palette-invoker {
  282. width: @cell-size - 2 * @line-width;
  283. height: @cell-size - @line-width;
  284. background-color: black;
  285. background-position: @line-width @line-width;
  286. background-repeat: no-repeat;
  287. background-size: @toolbutton-size;
  288. border: @line-width solid @button-grey;
  289. border-bottom: 0;
  290. }
  291. .palette-invoker:after {
  292. position: absolute;
  293. top: 4 * @subcell-size;
  294. left: 0;
  295. display: block;
  296. width: @cell-size;
  297. height: @subcell-size;
  298. background-color: transparent;
  299. background-image: url('../icons/emblems/arrow-up.svg');
  300. content: "";
  301. }
  302. .palette-invoker:before {
  303. position: absolute;
  304. top: @cell-size;
  305. left: @line-width;
  306. display: block;
  307. width: @cell-size - 2 * @line-width;
  308. height: @line-width;
  309. background-color: black;
  310. content: "";
  311. }
  312. .palette .wrapper {
  313. max-width: 5 * @cell-size - 2 * @line-width;
  314. min-width: 3 * @cell-size - 2 * @line-width;
  315. min-height: @cell-size - 2 * @line-width;
  316. pointer-events: auto;
  317. background-color: black;
  318. border: @line-width solid @button-grey;
  319. }
  320. .palette .header {
  321. height: @cell-size - 2 * @line-width;
  322. margin: 0 (@subcell-size / 2);
  323. font-weight: bold;
  324. line-height: @cell-size - 2 * @line-width;
  325. .unselectable;
  326. }
  327. .palette hr {
  328. border: (@line-width / 2) solid @button-grey;
  329. }
  330. .palette hr.header-separator {
  331. margin-top: 0;
  332. }
  333. .palette .row {
  334. height: @cell-size;
  335. margin: 0 (@subcell-size / 2);
  336. }
  337. .palette .row:nth-last-child(1) {
  338. height: @cell-size - 2 * @line-width;
  339. }
  340. .palette .row.small {
  341. height: 2 * @subcell-size;
  342. }
  343. .palette .row.expand {
  344. height: auto;
  345. }
  346. /* Palette menu */
  347. .palette .menu {
  348. padding: 0;
  349. margin-top: @subcell-size;
  350. margin-bottom: @subcell-size;
  351. list-style-type: none;
  352. }
  353. .palette .menu button {
  354. width: 100%;
  355. padding-top: 0;
  356. padding-bottom: 0;
  357. margin-top: 0;
  358. margin-bottom: 0;
  359. line-height: 3 * @subcell-size;
  360. text-align: left;
  361. background-color: transparent;
  362. border: 0;
  363. border-radius: 0;
  364. }
  365. .palette .menu button:hover {
  366. color: white;
  367. background-color: @button-grey;
  368. }
  369. .palette .menu button.icon {
  370. padding-left: 3 * @subcell-size + 2 * @line-width;
  371. }
  372. .palette .menu button.icon span {
  373. top: 0;
  374. left: 0;
  375. width: 3 * @subcell-size;
  376. height: 3 * @subcell-size;
  377. }
  378. /* Scrollbar */
  379. ::-webkit-scrollbar {
  380. width: @subcell-size;
  381. background-color: @button-grey;
  382. }
  383. ::-webkit-scrollbar-thumb {
  384. background-color: white;
  385. border: @line-width solid #ddd;
  386. border-radius: @subcell-size;
  387. }
  388. /* Grid for visual debugging and layout */
  389. .grid {
  390. position: absolute;
  391. top: 0;
  392. left: 0;
  393. background-color: transparent;
  394. }
  395. .appearance(@value) {
  396. -webkit-appearance: @value;
  397. -moz-appearance: @value;
  398. appearance: @value;
  399. }
  400. /* Checkbox and radio */
  401. input[type='checkbox'],
  402. input[type='radio'] {
  403. width: @icon-small-size;
  404. height: @icon-small-size;
  405. margin: @line-width @line-width (2 * @line-width) @line-width;
  406. vertical-align: middle;
  407. background-position: center;
  408. background-size: contain;
  409. .appearance(none);
  410. }
  411. .toolbar input[type='checkbox'],
  412. .toolbar input[type='radio'] {
  413. margin-top: (@toolbar-height - @icon-small-size) / 2 - @line-width;
  414. margin-bottom: (@toolbar-height - @icon-small-size) / 2 + @line-width;
  415. }
  416. input[type='checkbox'] {
  417. background-image: url(../icons/actions/checkbox-unchecked.svg);
  418. }
  419. input[type='checkbox']:active {
  420. background-image: url(../icons/actions/checkbox-checked-selected.svg);
  421. }
  422. input[type='checkbox']:checked:active {
  423. background-image: url(../icons/actions/checkbox-checked-selected.svg);
  424. }
  425. input[type='checkbox']:checked {
  426. background-image: url(../icons/actions/checkbox-checked.svg);
  427. }
  428. input[type='radio'] {
  429. background-image: url(../icons/actions/radio.svg);
  430. }
  431. input[type='radio']:active {
  432. background-image: url(../icons/actions/radio-selected.svg);
  433. }
  434. input[type='radio']:checked:active {
  435. background-image: url(../icons/actions/radio-active-selected.svg);
  436. }
  437. input[type='radio']:checked {
  438. background-image: url(../icons/actions/radio-active.svg);
  439. }
  440. /* Textarea */
  441. textarea {
  442. margin: @line-width;
  443. border: @line-width solid @button-grey;
  444. }
  445. textarea.expand {
  446. width: calc(~"100%" - (6 * (@line-width)));
  447. }
  448. /* Lists */
  449. ul.flat-list {
  450. padding: 0;
  451. margin: 0;
  452. list-style-type: none;
  453. }
  454. ul.flat-list li {
  455. height: 3 * @subcell-size - @line-width;
  456. line-height: 3 * @subcell-size - @line-width;
  457. background-color: white;
  458. border-bottom: @line-width dotted @panel-grey;
  459. }
  460. ul.flat-list li:nth-last-child(1) {
  461. border-bottom: none;
  462. }
  463. ul.flat-list.big li {
  464. height: 4 * @subcell-size - @line-width;
  465. line-height: 4 * @subcell-size - @line-width;
  466. }
  467. ul.flat-list.striped li:nth-child(odd) {
  468. background-color: @text-field-grey;
  469. }
  470. /* ActivityPalette */
  471. #activity-palette .wrapper {
  472. width: 5 * @cell-size - 2 * @line-width;
  473. }