main.css 9.5 KB

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