panel.css 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. :root {
  2. color-scheme: light dark;
  3. }
  4. body {
  5. background: light-dark( #fff, #333 );
  6. color: light-dark( #333, #e0e0e0 );
  7. margin: 0;
  8. padding: 10px;
  9. font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  10. font-size: 12px;
  11. }
  12. hr {
  13. color: light-dark( #333, #e0e0e0 );
  14. }
  15. #scene-tree {
  16. width: 100%;
  17. height: 100%;
  18. overflow: auto;
  19. }
  20. .header {
  21. padding: 8px 12px;
  22. background: light-dark( #f5f5f5, #333 );
  23. border-radius: 4px;
  24. margin-bottom: 16px;
  25. font-family: monospace;
  26. color: light-dark( #666, #aaa );
  27. }
  28. .header a {
  29. color: light-dark( #666, #aaa );
  30. text-decoration: none;
  31. }
  32. .header a:hover {
  33. color: light-dark( #333, #e0e0e0 );
  34. }
  35. .section {
  36. margin-bottom: 24px;
  37. }
  38. .section h3 {
  39. margin: 0 0 8px 0;
  40. font-size: 11px;
  41. text-transform: uppercase;
  42. color: light-dark( #666, #aaa );
  43. font-weight: 500;
  44. border-bottom: 1px solid light-dark( #eee, #444 );
  45. padding-bottom: 4px;
  46. }
  47. .tree-item {
  48. padding: 4px;
  49. cursor: pointer;
  50. display: flex;
  51. align-items: center;
  52. }
  53. .tree-item:hover {
  54. background: light-dark( #f0f0f0, #555 );
  55. }
  56. .tree-item .icon {
  57. margin-right: 4px;
  58. opacity: 0.7;
  59. }
  60. .tree-item .label {
  61. flex: 1;
  62. white-space: nowrap;
  63. overflow: hidden;
  64. text-overflow: ellipsis;
  65. }
  66. .tree-item .label .object-details {
  67. color: #aaa;
  68. margin-left: 4px;
  69. font-weight: normal;
  70. }
  71. .tree-item .type {
  72. margin-left: 8px;
  73. opacity: 0.5;
  74. font-size: 0.9em;
  75. }
  76. .children {
  77. margin-left: 0;
  78. }
  79. /* Style for clickable renderer summary */
  80. .renderer-summary {
  81. cursor: pointer;
  82. }
  83. .renderer-summary:hover {
  84. background: light-dark( #f0f0f0, #555 );
  85. }
  86. /* Hide default details marker when using custom summary */
  87. details.renderer-container > summary.renderer-summary { /* Target summary */
  88. list-style: none; /* Hide default arrow */
  89. cursor: pointer; /* Make the summary div look clickable */
  90. }
  91. details.renderer-container > summary.renderer-summary::-webkit-details-marker {
  92. display: none; /* Hide default arrow in WebKit */
  93. }
  94. /* Style for the toggle icon */
  95. .toggle-icon::before {
  96. content: '▶'; /* Default: collapsed */
  97. display: inline-block;
  98. width: 1em;
  99. margin-right: 2px;
  100. opacity: 0.7;
  101. }
  102. details.renderer-container[open] > summary.renderer-summary .toggle-icon::before {
  103. content: '▼'; /* Expanded */
  104. }
  105. /* Floating object details panel */
  106. .floating-details {
  107. position: fixed;
  108. z-index: 1000;
  109. background: light-dark( #fff, #2a2a2a );
  110. border: 1px solid light-dark( #ccc, #555 );
  111. border-radius: 6px;
  112. padding: 12px;
  113. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  114. max-width: 300px;
  115. min-width: 200px;
  116. font-size: 11px;
  117. pointer-events: none; /* Prevent interfering with mouse interactions */
  118. opacity: 0;
  119. transform: translateY(10px);
  120. transition: opacity 0.2s ease, transform 0.2s ease;
  121. }
  122. .floating-details.visible {
  123. opacity: 1;
  124. transform: translateY(0);
  125. }
  126. .floating-details h4 {
  127. margin: 8px 0 4px 0;
  128. font-size: 10px;
  129. text-transform: uppercase;
  130. color: light-dark( #666, #aaa );
  131. border-bottom: 1px solid light-dark( #eee, #444 );
  132. padding-bottom: 2px;
  133. }
  134. .floating-details .property-row {
  135. margin-bottom: 1px;
  136. font-size: 10px;
  137. }
  138. /* Scroll to canvas button */
  139. .scroll-to-canvas-btn {
  140. background: none;
  141. border: none;
  142. cursor: pointer;
  143. font-size: 12px;
  144. margin-left: 8px;
  145. padding: 2px 4px;
  146. border-radius: 3px;
  147. opacity: 0.6;
  148. transition: opacity 0.2s ease, background 0.2s ease;
  149. }
  150. .scroll-to-canvas-btn:hover {
  151. opacity: 1;
  152. background: light-dark( rgba(0,0,0,0.1), rgba(255,255,255,0.1) );
  153. }
  154. .scroll-to-canvas-placeholder {
  155. font-size: 12px;
  156. margin-left: 8px;
  157. padding: 2px 4px;
  158. opacity: 0.3;
  159. }
  160. /* Two-column layout for wide panel */
  161. @media (min-width: 1000px) {
  162. .sections-container {
  163. display: flex;
  164. gap: 20px;
  165. align-items: flex-start;
  166. }
  167. .sections-container .section {
  168. flex: 1;
  169. margin-bottom: 0;
  170. }
  171. /* Ensure sections have equal width */
  172. .sections-container .section:first-child {
  173. min-width: 0; /* Allow flexbox to shrink */
  174. }
  175. .sections-container .section:last-child {
  176. min-width: 0; /* Allow flexbox to shrink */
  177. }
  178. }
粤ICP备19079148号