main.css 9.2 KB

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