main.css 11 KB

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