main.css 9.2 KB

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