main.css 9.7 KB

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