main.css 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706
  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. #resizer {
  227. position: absolute;
  228. top: 32px;
  229. right: 295px;
  230. width: 5px;
  231. bottom: 0px;
  232. /* background-color: rgba(255,0,0,0.5); */
  233. cursor: ew-resize;
  234. }
  235. #viewport {
  236. position: absolute;
  237. top: 32px;
  238. left: 0;
  239. right: 300px;
  240. bottom: 0;
  241. }
  242. #viewport #info {
  243. text-shadow: 1px 1px 0 rgba(0,0,0,0.25);
  244. pointer-events: none;
  245. }
  246. #script {
  247. position: absolute;
  248. top: 32px;
  249. left: 0;
  250. right: 300px;
  251. bottom: 0;
  252. opacity: 0.9;
  253. }
  254. #player {
  255. position: absolute;
  256. top: 32px;
  257. left: 0;
  258. right: 300px;
  259. bottom: 0;
  260. }
  261. #menubar {
  262. position: absolute;
  263. width: 100%;
  264. height: 32px;
  265. background: #eee;
  266. padding: 0;
  267. margin: 0;
  268. right: 0;
  269. top: 0;
  270. }
  271. #menubar .menu {
  272. float: left;
  273. cursor: pointer;
  274. padding-right: 8px;
  275. }
  276. #menubar .menu.right {
  277. float: right;
  278. cursor: auto;
  279. padding-right: 0;
  280. text-align: right;
  281. }
  282. #menubar .menu .title {
  283. display: inline-block;
  284. color: #888;
  285. margin: 0;
  286. padding: 8px;
  287. line-height: 16px;
  288. }
  289. #menubar .menu .options {
  290. position: fixed;
  291. display: none;
  292. padding: 5px 0;
  293. background: #eee;
  294. width: 150px;
  295. max-height: calc(100% - 80px);
  296. overflow: auto;
  297. }
  298. #menubar .menu:hover .options {
  299. display: block;
  300. }
  301. #menubar .menu .options hr {
  302. border-color: #ddd;
  303. }
  304. #menubar .menu .options .option {
  305. color: #666;
  306. background-color: transparent;
  307. padding: 5px 10px;
  308. margin: 0 !important;
  309. }
  310. #menubar .menu .options .option:hover {
  311. color: #fff;
  312. background-color: #08f;
  313. }
  314. #menubar .menu .options .option:active {
  315. color: #666;
  316. background: transparent;
  317. }
  318. #menubar .menu .options .inactive {
  319. color: #bbb;
  320. background-color: transparent;
  321. padding: 5px 10px;
  322. margin: 0 !important;
  323. }
  324. #sidebar {
  325. position: absolute;
  326. right: 0;
  327. top: 32px;
  328. bottom: 0;
  329. width: 300px;
  330. background: #eee;
  331. overflow: auto;
  332. }
  333. #sidebar .Panel {
  334. color: #888;
  335. padding: 10px;
  336. border-top: 1px solid #ccc;
  337. }
  338. #sidebar .Panel.collapsed {
  339. margin-bottom: 0;
  340. }
  341. #sidebar .Row {
  342. min-height: 20px;
  343. margin-bottom: 10px;
  344. }
  345. #sidebar canvas {
  346. vertical-align: middle;
  347. }
  348. #tabs {
  349. background-color: #ddd;
  350. border-top: 1px solid #ccc;
  351. }
  352. #tabs span {
  353. color: #aaa;
  354. border-right: 1px solid #ccc;
  355. padding: 10px;
  356. }
  357. #tabs span.selected {
  358. color: #888;
  359. background-color: #eee;
  360. }
  361. #toolbar {
  362. position: absolute;
  363. left: 10px;
  364. top: 42px;
  365. width: 32px;
  366. background: #eee;
  367. text-align: center;
  368. }
  369. #toolbar button, #toolbar input {
  370. height: 32px;
  371. }
  372. #toolbar button img {
  373. width: 16px;
  374. opacity: 0.5;
  375. }
  376. .Outliner {
  377. color: #444;
  378. background-color: #fff;
  379. padding: 0;
  380. width: 100%;
  381. height: 140px;
  382. font-size: 12px;
  383. cursor: default;
  384. overflow: auto;
  385. resize: vertical;
  386. outline: none !important;
  387. }
  388. .Outliner .option {
  389. padding: 4px;
  390. color: #666;
  391. white-space: nowrap;
  392. }
  393. .Outliner .option:hover {
  394. background-color: rgba(0,0,0,0.02);
  395. }
  396. .Outliner .option.active {
  397. background-color: rgba(0,0,0,0.04);
  398. }
  399. .TabbedPanel .Tabs {
  400. background-color: #ddd;
  401. border-top: 1px solid #ccc;
  402. }
  403. .TabbedPanel .Tab {
  404. color: #aaa;
  405. border-right: 1px solid #ccc;
  406. }
  407. .TabbedPanel .Tab.selected {
  408. color: #888;
  409. background-color: #eee;
  410. }
  411. .Listbox {
  412. color: #444;
  413. background-color: #fff;
  414. }
  415. .Panel {
  416. color: #888;
  417. }
  418. /* */
  419. @media all and ( max-width: 600px ) {
  420. #resizer {
  421. display: none;
  422. }
  423. #menubar .menu .options {
  424. max-height: calc(100% - 372px);
  425. }
  426. #menubar .menu.right {
  427. display: none;
  428. }
  429. #viewport {
  430. left: 0;
  431. right: 0;
  432. top: 32px;
  433. height: calc(100% - 352px);
  434. }
  435. #script {
  436. left: 0;
  437. right: 0;
  438. top: 32px;
  439. height: calc(100% - 352px);
  440. }
  441. #player {
  442. left: 0;
  443. right: 0;
  444. top: 32px;
  445. height: calc(100% - 352px);
  446. }
  447. #sidebar {
  448. left: 0;
  449. width: 100%;
  450. top: calc(100% - 320px);
  451. bottom: 0;
  452. }
  453. }
  454. /* DARK MODE */
  455. @media ( prefers-color-scheme: dark ) {
  456. button {
  457. color: #aaa;
  458. background-color: #222;
  459. }
  460. button:hover {
  461. color: #ccc;
  462. background-color: #444;
  463. }
  464. button.selected {
  465. color: #fff;
  466. background-color: #08f;
  467. }
  468. input, textarea {
  469. background-color: #222;
  470. border: 1px solid transparent;
  471. color: #888;
  472. }
  473. select {
  474. color: #aaa;
  475. background-color: #222;
  476. }
  477. select:hover {
  478. color: #ccc;
  479. background-color: #444;
  480. }
  481. /* UI */
  482. #menubar {
  483. background: #111;
  484. }
  485. #menubar .menu .options {
  486. background: #111;
  487. }
  488. #menubar .menu .options hr {
  489. border-color: #222;
  490. }
  491. #menubar .menu .options .option {
  492. color: #888;
  493. }
  494. #menubar .menu .options .inactive {
  495. color: #444;
  496. }
  497. #sidebar {
  498. background-color: #111;
  499. }
  500. #sidebar .Panel {
  501. border-top: 1px solid #222;
  502. }
  503. #sidebar .Panel.Material canvas {
  504. border: solid 1px #5A5A5A;
  505. }
  506. #tabs {
  507. background-color: #1b1b1b;
  508. border-top: 1px solid #222;
  509. }
  510. #tabs span {
  511. color: #555;
  512. border-right: 1px solid #222;
  513. }
  514. #tabs span.selected {
  515. background-color: #111;
  516. }
  517. #toolbar {
  518. background-color: #111;
  519. }
  520. #toolbar img {
  521. filter: invert(1);
  522. }
  523. .Outliner {
  524. color: #888;
  525. background: #222;
  526. }
  527. .Outliner .option:hover {
  528. background-color: rgba(21,60,94,0.5);
  529. }
  530. .Outliner .option.active {
  531. background-color: rgba(21,60,94,1);
  532. }
  533. .TabbedPanel .Tabs {
  534. background-color: #1b1b1b;
  535. border-top: 1px solid #222;
  536. }
  537. .TabbedPanel .Tab {
  538. color: #555;
  539. border-right: 1px solid #222;
  540. }
  541. .TabbedPanel .Tab.selected {
  542. color: #888;
  543. background-color: #111;
  544. }
  545. .Listbox {
  546. color: #888;
  547. background: #222;
  548. }
  549. .Listbox .ListboxItem:hover {
  550. background-color: rgba(21,60,94,0.5);
  551. }
  552. .Listbox .ListboxItem.active {
  553. background-color: rgba(21,60,94,1);
  554. }
  555. }