main.css 9.5 KB

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