main.css 11 KB

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