main.css 8.7 KB

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