main.css 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692
  1. :root {
  2. color-scheme: light dark;
  3. }
  4. html {
  5. touch-action: none;
  6. }
  7. body {
  8. font-family: Helvetica, Arial, sans-serif;
  9. font-size: 14px;
  10. margin: 0;
  11. overflow: hidden;
  12. }
  13. hr {
  14. border: 0;
  15. border-top: 1px solid #ccc;
  16. }
  17. button {
  18. position: relative;
  19. }
  20. input {
  21. vertical-align: middle;
  22. }
  23. input[type="color"]::-webkit-color-swatch-wrapper {
  24. padding: 0;
  25. }
  26. input[type="color"]::-webkit-color-swatch {
  27. border: none;
  28. }
  29. textarea {
  30. tab-size: 4;
  31. white-space: pre;
  32. word-wrap: normal;
  33. vertical-align: middle;
  34. }
  35. textarea.success {
  36. border-color: #8b8 !important;
  37. }
  38. textarea.fail {
  39. border-color: #f00 !important;
  40. background-color: rgba(255,0,0,0.05);
  41. }
  42. textarea, input { outline: none; } /* osx */
  43. .Panel {
  44. -moz-user-select: none;
  45. -webkit-user-select: none;
  46. -ms-user-select: none;
  47. /* No support for these yet */
  48. -o-user-select: none;
  49. user-select: none;
  50. }
  51. .TabbedPanel {
  52. -moz-user-select: none;
  53. -webkit-user-select: none;
  54. -ms-user-select: none;
  55. /* No support for these yet */
  56. -o-user-select: none;
  57. user-select: none;
  58. position: relative;
  59. display: block;
  60. width: 100%;
  61. }
  62. .TabbedPanel .Tabs {
  63. position: relative;
  64. display: block;
  65. width: 100%;
  66. }
  67. .TabbedPanel .Tabs .Tab {
  68. padding: 10px;
  69. vertical-align: middle;
  70. text-transform: uppercase;
  71. }
  72. .TabbedPanel .Tabs .Panels {
  73. position: relative;
  74. display: block;
  75. width: 100%;
  76. height: 100%;
  77. }
  78. /* Listbox */
  79. .Listbox {
  80. color: #444;
  81. background-color: #fff;
  82. padding: 0;
  83. width: 100%;
  84. min-height: 140px;
  85. font-size: 12px;
  86. cursor: default;
  87. overflow: auto;
  88. }
  89. .Listbox .ListboxItem {
  90. padding: 6px;
  91. color: #666;
  92. white-space: nowrap;
  93. }
  94. .Listbox .ListboxItem.active {
  95. background-color: rgba(0, 0, 0, 0.04);
  96. }
  97. /* CodeMirror */
  98. .CodeMirror {
  99. position: absolute !important;
  100. top: 37px;
  101. width: 100% !important;
  102. height: calc(100% - 37px) !important;
  103. }
  104. .CodeMirror .errorLine {
  105. background: rgba(255,0,0,0.25);
  106. }
  107. .CodeMirror .esprima-error {
  108. color: #f00;
  109. text-align: right;
  110. padding: 0 20px;
  111. }
  112. /* outliner */
  113. #outliner .opener {
  114. display: inline-block;
  115. width: 14px;
  116. height: 14px;
  117. margin: 0px 4px;
  118. vertical-align: top;
  119. text-align: center;
  120. }
  121. #outliner .opener.open:after {
  122. content: '−';
  123. }
  124. #outliner .opener.closed:after {
  125. content: '+';
  126. }
  127. #outliner .option {
  128. border: 1px solid transparent;
  129. }
  130. #outliner .option.drag {
  131. border: 1px dashed #999;
  132. }
  133. #outliner .option.dragTop {
  134. border-top: 1px dashed #999;
  135. }
  136. #outliner .option.dragBottom {
  137. border-bottom: 1px dashed #999;
  138. }
  139. #outliner .type {
  140. display: inline-block;
  141. width: 14px;
  142. height: 14px;
  143. color: #ddd;
  144. text-align: center;
  145. }
  146. #outliner .type:after {
  147. content: '●';
  148. }
  149. /* */
  150. #outliner .Scene {
  151. color: #8888dd;
  152. }
  153. #outliner .Camera {
  154. color: #dd8888;
  155. }
  156. #outliner .Light {
  157. color: #dddd88;
  158. }
  159. /* */
  160. #outliner .Object3D {
  161. color: #aaaaee;
  162. }
  163. #outliner .Mesh {
  164. color: #8888ee;
  165. }
  166. #outliner .Line {
  167. color: #88ee88;
  168. }
  169. #outliner .LineSegments {
  170. color: #88ee88;
  171. }
  172. #outliner .Points {
  173. color: #ee8888;
  174. }
  175. /* */
  176. #outliner .Geometry {
  177. color: #aaeeaa;
  178. }
  179. #outliner .Material {
  180. color: #eeaaee;
  181. }
  182. /* */
  183. #outliner .Script:after {
  184. content: '{...}' /* ❮/❯ */
  185. }
  186. /* */
  187. button {
  188. color: #555;
  189. background-color: #ddd;
  190. border: 0px;
  191. margin: 0px; /* GNOME Web */
  192. padding: 5px 8px;
  193. text-transform: uppercase;
  194. cursor: pointer;
  195. outline: none;
  196. }
  197. button:hover {
  198. background-color: #fff;
  199. }
  200. button.selected {
  201. background-color: #fff;
  202. }
  203. input, textarea {
  204. border: 1px solid transparent;
  205. color: #444;
  206. }
  207. input.Number {
  208. color: #08f!important;
  209. font-size: 12px;
  210. border: 0px;
  211. padding: 2px;
  212. cursor: col-resize;
  213. }
  214. select {
  215. color: #666;
  216. background-color: #ddd;
  217. border: 0px;
  218. text-transform: uppercase;
  219. cursor: pointer;
  220. outline: none;
  221. }
  222. select:hover {
  223. background-color: #fff;
  224. }
  225. /* UI */
  226. #viewport {
  227. position: absolute;
  228. top: 32px;
  229. left: 0;
  230. right: 300px;
  231. bottom: 0;
  232. }
  233. #viewport #info {
  234. text-shadow: 1px 1px 0 rgba(0,0,0,0.25);
  235. pointer-events: none;
  236. }
  237. #script {
  238. position: absolute;
  239. top: 32px;
  240. left: 0;
  241. right: 300px;
  242. bottom: 0;
  243. opacity: 0.9;
  244. }
  245. #player {
  246. position: absolute;
  247. top: 32px;
  248. left: 0;
  249. right: 300px;
  250. bottom: 0;
  251. }
  252. #menubar {
  253. position: absolute;
  254. width: 100%;
  255. height: 32px;
  256. background: #eee;
  257. padding: 0;
  258. margin: 0;
  259. right: 0;
  260. top: 0;
  261. }
  262. #menubar .menu {
  263. float: left;
  264. cursor: pointer;
  265. padding-right: 8px;
  266. }
  267. #menubar .menu.right {
  268. float: right;
  269. cursor: auto;
  270. padding-right: 0;
  271. text-align: right;
  272. }
  273. #menubar .menu .title {
  274. display: inline-block;
  275. color: #888;
  276. margin: 0;
  277. padding: 8px;
  278. line-height: 16px;
  279. }
  280. #menubar .menu .options {
  281. position: fixed;
  282. display: none;
  283. padding: 5px 0;
  284. background: #eee;
  285. width: 150px;
  286. max-height: calc(100% - 80px);
  287. overflow: auto;
  288. }
  289. #menubar .menu:hover .options {
  290. display: block;
  291. }
  292. #menubar .menu .options hr {
  293. border-color: #ddd;
  294. }
  295. #menubar .menu .options .option {
  296. color: #666;
  297. background-color: transparent;
  298. padding: 5px 10px;
  299. margin: 0 !important;
  300. }
  301. #menubar .menu .options .option:hover {
  302. color: #fff;
  303. background-color: #08f;
  304. }
  305. #menubar .menu .options .option:active {
  306. color: #666;
  307. background: transparent;
  308. }
  309. #menubar .menu .options .inactive {
  310. color: #bbb;
  311. background-color: transparent;
  312. padding: 5px 10px;
  313. margin: 0 !important;
  314. }
  315. #sidebar {
  316. position: absolute;
  317. right: 0;
  318. top: 32px;
  319. bottom: 0;
  320. width: 300px;
  321. background: #eee;
  322. overflow: auto;
  323. }
  324. #sidebar .Panel {
  325. color: #888;
  326. padding: 10px;
  327. border-top: 1px solid #ccc;
  328. }
  329. #sidebar .Panel.collapsed {
  330. margin-bottom: 0;
  331. }
  332. #sidebar .Row {
  333. min-height: 20px;
  334. margin-bottom: 10px;
  335. }
  336. #sidebar canvas {
  337. vertical-align: middle;
  338. }
  339. #tabs {
  340. background-color: #ddd;
  341. border-top: 1px solid #ccc;
  342. }
  343. #tabs span {
  344. color: #aaa;
  345. border-right: 1px solid #ccc;
  346. padding: 10px;
  347. }
  348. #tabs span.selected {
  349. color: #888;
  350. background-color: #eee;
  351. }
  352. #toolbar {
  353. position: absolute;
  354. left: 10px;
  355. top: 42px;
  356. width: 32px;
  357. background: #eee;
  358. text-align: center;
  359. }
  360. #toolbar button, #toolbar input {
  361. height: 32px;
  362. }
  363. #toolbar button img {
  364. width: 16px;
  365. opacity: 0.5;
  366. }
  367. .Outliner {
  368. color: #444;
  369. background-color: #fff;
  370. padding: 0;
  371. width: 100%;
  372. height: 140px;
  373. font-size: 12px;
  374. cursor: default;
  375. overflow: auto;
  376. resize: vertical;
  377. outline: none !important;
  378. }
  379. .Outliner .option {
  380. padding: 4px;
  381. color: #666;
  382. white-space: nowrap;
  383. }
  384. .Outliner .option:hover {
  385. background-color: rgba(0,0,0,0.02);
  386. }
  387. .Outliner .option.active {
  388. background-color: rgba(0,0,0,0.04);
  389. }
  390. .TabbedPanel .Tabs {
  391. background-color: #ddd;
  392. border-top: 1px solid #ccc;
  393. }
  394. .TabbedPanel .Tab {
  395. color: #aaa;
  396. border-right: 1px solid #ccc;
  397. }
  398. .TabbedPanel .Tab.selected {
  399. color: #888;
  400. background-color: #eee;
  401. }
  402. .Listbox {
  403. color: #444;
  404. background-color: #fff;
  405. }
  406. .Panel {
  407. color: #888;
  408. }
  409. /* */
  410. @media all and ( max-width: 600px ) {
  411. #menubar .menu .options {
  412. max-height: calc(100% - 372px);
  413. }
  414. #menubar .menu.right {
  415. display: none;
  416. }
  417. #viewport {
  418. left: 0;
  419. right: 0;
  420. top: 32px;
  421. height: calc(100% - 352px);
  422. }
  423. #script {
  424. left: 0;
  425. right: 0;
  426. top: 32px;
  427. height: calc(100% - 352px);
  428. }
  429. #player {
  430. left: 0;
  431. right: 0;
  432. top: 32px;
  433. height: calc(100% - 352px);
  434. }
  435. #sidebar {
  436. left: 0;
  437. width: 100%;
  438. top: calc(100% - 320px);
  439. bottom: 0;
  440. }
  441. }
  442. /* DARK MODE */
  443. @media ( prefers-color-scheme: dark ) {
  444. button {
  445. color: #aaa;
  446. background-color: #222;
  447. }
  448. button:hover {
  449. color: #ccc;
  450. background-color: #444;
  451. }
  452. button.selected {
  453. color: #fff;
  454. background-color: #08f;
  455. }
  456. input, textarea {
  457. background-color: #222;
  458. border: 1px solid transparent;
  459. color: #888;
  460. }
  461. select {
  462. color: #aaa;
  463. background-color: #222;
  464. }
  465. select:hover {
  466. color: #ccc;
  467. background-color: #444;
  468. }
  469. /* UI */
  470. #menubar {
  471. background: #111;
  472. }
  473. #menubar .menu .options {
  474. background: #111;
  475. }
  476. #menubar .menu .options hr {
  477. border-color: #222;
  478. }
  479. #menubar .menu .options .option {
  480. color: #888;
  481. }
  482. #menubar .menu .options .inactive {
  483. color: #444;
  484. }
  485. #sidebar {
  486. background-color: #111;
  487. }
  488. #sidebar .Panel {
  489. border-top: 1px solid #222;
  490. }
  491. #sidebar .Panel.Material canvas {
  492. border: solid 1px #5A5A5A;
  493. }
  494. #tabs {
  495. background-color: #1b1b1b;
  496. border-top: 1px solid #222;
  497. }
  498. #tabs span {
  499. color: #555;
  500. border-right: 1px solid #222;
  501. }
  502. #tabs span.selected {
  503. background-color: #111;
  504. }
  505. #toolbar {
  506. background-color: #111;
  507. }
  508. #toolbar img {
  509. filter: invert(1);
  510. }
  511. .Outliner {
  512. color: #888;
  513. background: #222;
  514. }
  515. .Outliner .option:hover {
  516. background-color: rgba(21,60,94,0.5);
  517. }
  518. .Outliner .option.active {
  519. background-color: rgba(21,60,94,1);
  520. }
  521. .TabbedPanel .Tabs {
  522. background-color: #1b1b1b;
  523. border-top: 1px solid #222;
  524. }
  525. .TabbedPanel .Tab {
  526. color: #555;
  527. border-right: 1px solid #222;
  528. }
  529. .TabbedPanel .Tab.selected {
  530. color: #888;
  531. background-color: #111;
  532. }
  533. .Listbox {
  534. color: #888;
  535. background: #222;
  536. }
  537. .Listbox .ListboxItem:hover {
  538. background-color: rgba(21,60,94,0.5);
  539. }
  540. .Listbox .ListboxItem.active {
  541. background-color: rgba(21,60,94,1);
  542. }
  543. }