1
0

Style.js 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584
  1. export class Style {
  2. static init() {
  3. if ( document.getElementById( 'profiler-styles' ) ) return;
  4. const css = `
  5. :root {
  6. --profiler-bg: #1e1e24f5;
  7. --profiler-header-bg: #2a2a33aa;
  8. --profiler-header: #2a2a33;
  9. --profiler-border: #4a4a5a;
  10. --text-primary: #e0e0e0;
  11. --text-secondary: #9a9aab;
  12. --accent-color: #00aaff;
  13. --color-green: #4caf50;
  14. --color-yellow: #ffc107;
  15. --color-red: #f44336;
  16. --font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  17. --font-mono: 'Fira Code', 'Courier New', Courier, monospace;
  18. }
  19. @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&family=Fira+Code&display=swap');
  20. #profiler-panel *, #profiler-toggle * {
  21. text-transform: initial;
  22. line-height: normal;
  23. box-sizing: border-box;
  24. -webkit-font-smoothing: antialiased;
  25. -moz-osx-font-smoothing: grayscale;
  26. }
  27. #profiler-toggle {
  28. position: fixed;
  29. top: 15px;
  30. right: 15px;
  31. background-color: rgba(30, 30, 36, 0.85);
  32. border: 1px solid #4a4a5a54;
  33. border-radius: 12px 6px 6px 12px;
  34. color: var(--text-primary);
  35. cursor: pointer;
  36. z-index: 1001;
  37. transition: all 0.2s ease-in-out;
  38. /*font-size: 14px;*/
  39. font-size: 15px;
  40. backdrop-filter: blur(8px);
  41. box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  42. display: flex;
  43. align-items: stretch;
  44. padding: 0;
  45. overflow: hidden;
  46. font-family: var(--font-family);
  47. }
  48. #profiler-toggle:hover {
  49. border-color: var(--accent-color);
  50. }
  51. #profiler-toggle.hidden {
  52. opacity: 0;
  53. pointer-events: none;
  54. }
  55. #toggle-icon {
  56. display: flex;
  57. align-items: center;
  58. justify-content: center;
  59. width: 40px;
  60. font-size: 20px;
  61. transition: background-color 0.2s;
  62. }
  63. #profiler-toggle:hover #toggle-icon {
  64. background-color: rgba(255, 255, 255, 0.05);
  65. }
  66. .toggle-separator {
  67. width: 1px;
  68. background-color: var(--profiler-border);
  69. }
  70. #toggle-text {
  71. display: flex;
  72. align-items: baseline;
  73. padding: 8px 14px;
  74. min-width: 80px;
  75. justify-content: right;
  76. }
  77. #toggle-text .fps-label {
  78. font-size: 0.7em;
  79. margin-left: 10px;
  80. color: #999;
  81. }
  82. #builtin-tabs-container {
  83. display: flex;
  84. align-items: stretch;
  85. gap: 0;
  86. border-right: 1px solid #262636;
  87. order: -1;
  88. }
  89. .builtin-tab-btn {
  90. background: transparent;
  91. border: none;
  92. color: var(--text-secondary);
  93. cursor: pointer;
  94. padding: 8px 14px;
  95. font-family: var(--font-family);
  96. font-size: 13px;
  97. font-weight: 600;
  98. transition: all 0.2s;
  99. display: flex;
  100. align-items: center;
  101. justify-content: center;
  102. min-width: 32px;
  103. position: relative;
  104. }
  105. .builtin-tab-btn svg {
  106. width: 20px;
  107. height: 20px;
  108. stroke: currentColor;
  109. }
  110. .builtin-tab-btn:hover {
  111. background-color: rgba(255, 255, 255, 0.08);
  112. color: var(--accent-color);
  113. }
  114. .builtin-tab-btn:active {
  115. background-color: rgba(255, 255, 255, 0.12);
  116. }
  117. .builtin-tab-btn.active {
  118. background-color: rgba(0, 170, 255, 0.2);
  119. color: var(--accent-color);
  120. }
  121. .builtin-tab-btn.active:hover {
  122. background-color: rgba(0, 170, 255, 0.3);
  123. }
  124. #profiler-mini-panel {
  125. position: fixed;
  126. top: 60px;
  127. right: 15px;
  128. background-color: rgba(30, 30, 36, 0.85);
  129. border: 1px solid #4a4a5a54;
  130. border-radius: 8px;
  131. color: var(--text-primary);
  132. z-index: 9999;
  133. backdrop-filter: blur(8px);
  134. box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
  135. font-family: var(--font-family);
  136. font-size: 11px;
  137. width: 350px;
  138. max-height: calc(100vh - 100px);
  139. overflow-y: auto;
  140. overflow-x: hidden;
  141. display: none;
  142. opacity: 0;
  143. transform: translateY(-10px) scale(0.98);
  144. transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
  145. transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  146. }
  147. #profiler-mini-panel.visible {
  148. display: block;
  149. opacity: 1;
  150. transform: translateY(0) scale(1);
  151. }
  152. #profiler-mini-panel::-webkit-scrollbar {
  153. width: 6px;
  154. }
  155. #profiler-mini-panel::-webkit-scrollbar-track {
  156. background: transparent;
  157. }
  158. #profiler-mini-panel::-webkit-scrollbar-thumb {
  159. background: rgba(255, 255, 255, 0.15);
  160. border-radius: 3px;
  161. transition: background 0.2s;
  162. }
  163. #profiler-mini-panel::-webkit-scrollbar-thumb:hover {
  164. background: rgba(255, 255, 255, 0.25);
  165. }
  166. .mini-panel-content {
  167. padding: 0;
  168. font-size: 11px;
  169. line-height: 1.5;
  170. font-family: var(--font-mono);
  171. letter-spacing: 0.3px;
  172. user-select: none;
  173. -webkit-user-select: none;
  174. }
  175. .mini-panel-content .profiler-content {
  176. display: block !important;
  177. background: transparent;
  178. }
  179. .mini-panel-content .list-scroll-wrapper {
  180. max-height: calc(100vh - 120px);
  181. overflow-y: auto;
  182. overflow-x: hidden;
  183. }
  184. .mini-panel-content .list-scroll-wrapper::-webkit-scrollbar {
  185. width: 4px;
  186. }
  187. .mini-panel-content .list-scroll-wrapper::-webkit-scrollbar-track {
  188. background: transparent;
  189. }
  190. .mini-panel-content .list-scroll-wrapper::-webkit-scrollbar-thumb {
  191. background: rgba(255, 255, 255, 0.1);
  192. border-radius: 2px;
  193. }
  194. .mini-panel-content .list-scroll-wrapper::-webkit-scrollbar-thumb:hover {
  195. background: rgba(255, 255, 255, 0.2);
  196. }
  197. .mini-panel-content .parameters {
  198. background: transparent;
  199. border: none;
  200. box-shadow: none;
  201. padding: 4px;
  202. }
  203. .mini-panel-content .list-container.parameters {
  204. padding: 2px 6px 0px 6px !important;
  205. }
  206. .mini-panel-content .list-header {
  207. display: none;
  208. padding: 2px 4px;
  209. font-size: 11px;
  210. font-weight: 600;
  211. text-transform: uppercase;
  212. letter-spacing: 0.5px;
  213. }
  214. .mini-panel-content .list-item {
  215. border-bottom: 1px solid rgba(74, 74, 90, 0.2);
  216. transition: background-color 0.15s;
  217. }
  218. .mini-panel-content .list-item:last-child {
  219. border-bottom: none;
  220. }
  221. .mini-panel-content .list-item:hover {
  222. background-color: rgba(255, 255, 255, 0.04);
  223. }
  224. .mini-panel-content .list-item.actionable:hover {
  225. background-color: rgba(255, 255, 255, 0.06);
  226. cursor: pointer;
  227. }
  228. /* Style adjustments for lil-gui look */
  229. .mini-panel-content .item-row {
  230. padding: 3px 8px;
  231. min-height: 24px;
  232. }
  233. .mini-panel-content .list-item-row {
  234. padding: 1px 4px;
  235. gap: 8px;
  236. min-height: 21px;
  237. align-items: center;
  238. }
  239. .mini-panel-content input[type="checkbox"] {
  240. width: 12px;
  241. height: 12px;
  242. }
  243. .mini-panel-content input[type="range"] {
  244. height: 18px;
  245. }
  246. .mini-panel-content .value-number input,
  247. .mini-panel-content .value-slider input {
  248. background-color: rgba(0, 0, 0, 0.3);
  249. border: 1px solid rgba(74, 74, 90, 0.5);
  250. font-size: 10px;
  251. }
  252. .mini-panel-content .value-number input:focus,
  253. .mini-panel-content .value-slider input:focus {
  254. border-color: var(--accent-color);
  255. }
  256. .mini-panel-content .value-slider {
  257. gap: 6px;
  258. }
  259. /* Compact nested items */
  260. .mini-panel-content .list-item .list-item {
  261. margin-left: 8px;
  262. }
  263. .mini-panel-content .list-item .list-item .item-row,
  264. .mini-panel-content .list-item .list-item .list-item-row {
  265. padding: 2px 6px;
  266. min-height: 22px;
  267. }
  268. /* Compact collapsible headers */
  269. .mini-panel-content .collapsible .item-row,
  270. .mini-panel-content .list-item-row.collapsible {
  271. padding: 2px 8px;
  272. font-weight: 600;
  273. min-height: 16px;
  274. display: flex;
  275. align-items: center;
  276. }
  277. .mini-panel-content .collapsible-icon {
  278. font-size: 10px;
  279. width: 14px;
  280. height: 14px;
  281. }
  282. .mini-panel-content .param-control input[type="range"] {
  283. height: 12px;
  284. margin-top: 1px;
  285. padding-top: 5px;
  286. user-select: none;
  287. -webkit-user-select: none;
  288. outline: none;
  289. }
  290. .mini-panel-content .param-control input[type="range"]::-webkit-slider-thumb {
  291. width: 14px;
  292. height: 14px;
  293. margin-top: -5px;
  294. user-select: none;
  295. -webkit-user-select: none;
  296. }
  297. .mini-panel-content .param-control input[type="range"]::-moz-range-thumb {
  298. width: 14px;
  299. height: 14px;
  300. user-select: none;
  301. -moz-user-select: none;
  302. }
  303. .mini-panel-content .list-children-container {
  304. padding-left: 0;
  305. }
  306. .mini-panel-content .param-control input[type="number"] {
  307. flex-basis: 60px !important;
  308. }
  309. .mini-panel-content .param-control {
  310. align-items: center;
  311. }
  312. .mini-panel-content .param-control select {
  313. font-size: 11px;
  314. }
  315. .mini-panel-content .list-item-wrapper {
  316. margin-top: 0;
  317. margin-bottom: 0;
  318. }
  319. #profiler-panel {
  320. position: fixed;
  321. z-index: 1001 !important;
  322. bottom: 0;
  323. left: 0;
  324. right: 0;
  325. height: 350px;
  326. background-color: var(--profiler-bg);
  327. backdrop-filter: blur(8px);
  328. border-top: 2px solid var(--profiler-border);
  329. color: var(--text-primary);
  330. display: flex;
  331. flex-direction: column;
  332. z-index: 1000;
  333. /*box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.5);*/
  334. transform: translateY(100%);
  335. transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), height 0.3s ease-out, width 0.3s ease-out;
  336. font-family: var(--font-mono);
  337. }
  338. #profiler-panel.resizing,
  339. #profiler-panel.dragging {
  340. transition: none;
  341. }
  342. #profiler-panel.visible {
  343. transform: translateY(0);
  344. }
  345. #profiler-panel.maximized {
  346. height: 100vh;
  347. }
  348. /* Position-specific styles */
  349. #profiler-panel.position-top {
  350. bottom: auto;
  351. top: 0;
  352. border-top: none;
  353. border-bottom: 2px solid var(--profiler-border);
  354. transform: translateY(-100%);
  355. }
  356. #profiler-panel.position-top.visible {
  357. transform: translateY(0);
  358. }
  359. #profiler-panel.position-bottom {
  360. /* Default position - already defined above */
  361. }
  362. #profiler-panel.position-left {
  363. top: 0;
  364. bottom: 0;
  365. left: 0;
  366. right: auto;
  367. width: 350px;
  368. height: 100%;
  369. border-top: none;
  370. border-right: 2px solid var(--profiler-border);
  371. transform: translateX(-100%);
  372. }
  373. #profiler-panel.position-left.visible {
  374. transform: translateX(0);
  375. }
  376. #profiler-panel.position-right {
  377. top: 0;
  378. bottom: 0;
  379. left: auto;
  380. right: 0;
  381. width: 350px;
  382. height: 100%;
  383. border-top: none;
  384. border-left: 2px solid var(--profiler-border);
  385. transform: translateX(100%);
  386. }
  387. #profiler-panel.position-right.visible {
  388. transform: translateX(0);
  389. }
  390. #profiler-panel.position-floating {
  391. border: 2px solid var(--profiler-border);
  392. border-radius: 8px;
  393. box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  394. transform: none !important;
  395. overflow: hidden;
  396. }
  397. #profiler-panel.position-floating.visible {
  398. transform: none !important;
  399. }
  400. #profiler-panel.position-floating .profiler-header {
  401. border-radius: 6px 6px 0 0;
  402. }
  403. #profiler-panel.position-floating .panel-resizer {
  404. bottom: 0;
  405. right: 0;
  406. top: auto;
  407. left: auto;
  408. width: 16px;
  409. height: 16px;
  410. cursor: nwse-resize;
  411. border-radius: 0 0 6px 0;
  412. }
  413. #profiler-panel.position-floating .panel-resizer::after {
  414. content: '';
  415. position: absolute;
  416. right: 2px;
  417. bottom: 2px;
  418. width: 10px;
  419. height: 10px;
  420. background: linear-gradient(135deg, transparent 0%, transparent 45%, var(--profiler-border) 45%, var(--profiler-border) 55%, transparent 55%);
  421. }
  422. .panel-resizer {
  423. position: absolute;
  424. top: -2px;
  425. left: 0;
  426. width: 100%;
  427. height: 5px;
  428. cursor: ns-resize;
  429. z-index: 1001;
  430. touch-action: none;
  431. }
  432. #profiler-panel.position-top .panel-resizer {
  433. top: auto;
  434. bottom: -2px;
  435. }
  436. #profiler-panel.position-left .panel-resizer {
  437. top: 0;
  438. left: auto;
  439. right: -2px;
  440. width: 5px;
  441. height: 100%;
  442. cursor: ew-resize;
  443. }
  444. #profiler-panel.position-right .panel-resizer {
  445. top: 0;
  446. left: -2px;
  447. right: auto;
  448. width: 5px;
  449. height: 100%;
  450. cursor: ew-resize;
  451. }
  452. .profiler-header {
  453. display: flex;
  454. background-color: var(--profiler-header-bg);
  455. border-bottom: 1px solid var(--profiler-border);
  456. flex-shrink: 0;
  457. justify-content: space-between;
  458. align-items: stretch;
  459. overflow-x: auto;
  460. overflow-y: hidden;
  461. width: calc(100% - 134px);
  462. height: 38px;
  463. user-select: none;
  464. -webkit-user-select: none;
  465. }
  466. /* Adjust header width based on panel position */
  467. #profiler-panel.position-right .profiler-header,
  468. #profiler-panel.position-left .profiler-header {
  469. width: calc(100% - 134px);
  470. }
  471. #profiler-panel.position-bottom .profiler-header,
  472. #profiler-panel.position-top .profiler-header {
  473. width: calc(100% - 134px);
  474. }
  475. /* Adjust header width when position toggle button is hidden (mobile) */
  476. #profiler-panel.hide-position-toggle .profiler-header {
  477. width: calc(100% - 90px);
  478. }
  479. /* ===== RULES FOR WHEN THERE ARE NO TABS ===== */
  480. /* Horizontal mode (bottom/top) without tabs */
  481. #profiler-panel.position-bottom.no-tabs:not(.maximized),
  482. #profiler-panel.position-top.no-tabs:not(.maximized) {
  483. height: 38px !important;
  484. min-height: 38px !important;
  485. }
  486. #profiler-panel.position-bottom.no-tabs .profiler-header,
  487. #profiler-panel.position-top.no-tabs .profiler-header {
  488. width: 100%;
  489. height: 38px;
  490. border-bottom: none;
  491. }
  492. #profiler-panel.position-bottom.no-tabs .profiler-content-wrapper,
  493. #profiler-panel.position-top.no-tabs .profiler-content-wrapper {
  494. display: none;
  495. }
  496. #profiler-panel.position-bottom.no-tabs .panel-resizer,
  497. #profiler-panel.position-top.no-tabs .panel-resizer {
  498. display: none;
  499. }
  500. /* Vertical mode (right/left) without tabs */
  501. #profiler-panel.position-right.no-tabs:not(.maximized),
  502. #profiler-panel.position-left.no-tabs:not(.maximized) {
  503. width: 45px !important;
  504. min-width: 45px !important;
  505. }
  506. /* Vertical layout for header when no tabs */
  507. #profiler-panel.position-right.no-tabs .profiler-header,
  508. #profiler-panel.position-left.no-tabs .profiler-header {
  509. width: 100%;
  510. flex-direction: column;
  511. height: 100%;
  512. border-bottom: none;
  513. }
  514. /* Vertical layout for controls when no tabs */
  515. #profiler-panel.position-right.no-tabs .profiler-controls,
  516. #profiler-panel.position-left.no-tabs .profiler-controls {
  517. position: static;
  518. flex-direction: column-reverse;
  519. justify-content: flex-end;
  520. width: 100%;
  521. height: 100%;
  522. border-bottom: none;
  523. border-left: none;
  524. background: transparent;
  525. }
  526. #profiler-panel.position-right.no-tabs .profiler-controls button,
  527. #profiler-panel.position-left.no-tabs .profiler-controls button {
  528. width: 100%;
  529. height: 45px;
  530. border-left: none;
  531. border-top: none;
  532. border-bottom: 1px solid var(--profiler-border);
  533. }
  534. #profiler-panel.position-right.no-tabs .profiler-content-wrapper,
  535. #profiler-panel.position-left.no-tabs .profiler-content-wrapper {
  536. display: none;
  537. }
  538. #profiler-panel.position-right.no-tabs .profiler-tabs,
  539. #profiler-panel.position-left.no-tabs .profiler-tabs {
  540. display: none;
  541. }
  542. #profiler-panel.position-right.no-tabs .panel-resizer,
  543. #profiler-panel.position-left.no-tabs .panel-resizer {
  544. display: none;
  545. }
  546. /* Hide position toggle on mobile without tabs */
  547. #profiler-panel.hide-position-toggle.position-right.no-tabs:not(.maximized),
  548. #profiler-panel.hide-position-toggle.position-left.no-tabs:not(.maximized) {
  549. width: 45px !important;
  550. min-width: 45px !important;
  551. }
  552. /* Hide drag indicator on mobile devices */
  553. #profiler-panel.hide-position-toggle .tab-btn.active::before {
  554. display: none;
  555. }
  556. .profiler-header::-webkit-scrollbar {
  557. width: 8px;
  558. height: 8px;
  559. }
  560. .profiler-header::-webkit-scrollbar-track {
  561. background: transparent;
  562. }
  563. .profiler-header::-webkit-scrollbar-thumb {
  564. background-color: rgba(0, 0, 0, 0.25);
  565. border-radius: 10px;
  566. transition: background 0.3s ease;
  567. }
  568. .profiler-header::-webkit-scrollbar-thumb:hover {
  569. background-color: rgba(0, 0, 0, 0.4);
  570. }
  571. .profiler-header::-webkit-scrollbar-corner {
  572. background: transparent;
  573. }
  574. #profiler-panel.dragging .profiler-header {
  575. cursor: grabbing !important;
  576. }
  577. #profiler-panel.dragging {
  578. opacity: 0.8;
  579. }
  580. .profiler-tabs {
  581. display: flex;
  582. cursor: grab;
  583. position: relative;
  584. }
  585. .profiler-tabs:active {
  586. cursor: grabbing;
  587. }
  588. .profiler-tabs::-webkit-scrollbar {
  589. width: 8px;
  590. height: 8px;
  591. }
  592. .profiler-tabs::-webkit-scrollbar-track {
  593. background: transparent;
  594. }
  595. .profiler-tabs::-webkit-scrollbar-thumb {
  596. background-color: rgba(0, 0, 0, 0.25);
  597. border-radius: 10px;
  598. transition: background 0.3s ease;
  599. }
  600. .profiler-tabs::-webkit-scrollbar-thumb:hover {
  601. background-color: rgba(0, 0, 0, 0.4);
  602. }
  603. .profiler-tabs::-webkit-scrollbar-corner {
  604. background: transparent;
  605. }
  606. .profiler-controls {
  607. display: flex;
  608. position: absolute;
  609. right: 0;
  610. top: 0;
  611. height: 38px;
  612. background: var(--profiler-header-bg);
  613. border-bottom: 1px solid var(--profiler-border);
  614. }
  615. .tab-btn {
  616. position: relative;
  617. background: transparent;
  618. border: none;
  619. /*border-right: 1px solid var(--profiler-border);*/
  620. color: var(--text-secondary);
  621. padding: 8px 18px;
  622. cursor: default;
  623. display: flex;
  624. align-items: center;
  625. font-family: var(--font-family);
  626. font-weight: 600;
  627. font-size: 14px;
  628. user-select: none;
  629. transition: opacity 0.2s, transform 0.2s;
  630. touch-action: none;
  631. }
  632. .tab-btn.active {
  633. border-bottom: 2px solid var(--accent-color);
  634. color: white;
  635. }
  636. .tab-btn.active::before {
  637. content: '⋮⋮';
  638. position: absolute;
  639. left: 3px;
  640. top: calc(50% - 2px);
  641. transform: translateY(-50%);
  642. color: var(--profiler-border);
  643. font-size: 18px;
  644. letter-spacing: -2px;
  645. opacity: 0.6;
  646. }
  647. .tab-btn.no-detach.active::before {
  648. display: none;
  649. }
  650. #floating-btn,
  651. #maximize-btn,
  652. #hide-panel-btn {
  653. background: transparent;
  654. border: none;
  655. border-left: 1px solid var(--profiler-border);
  656. color: var(--text-secondary);
  657. width: 45px;
  658. height: 100%;
  659. cursor: pointer;
  660. transition: all 0.2s;
  661. display: flex;
  662. align-items: center;
  663. justify-content: center;
  664. flex-shrink: 0;
  665. }
  666. /* Disable transitions in vertical mode to avoid broken animations */
  667. #profiler-panel.position-right #floating-btn,
  668. #profiler-panel.position-right #maximize-btn,
  669. #profiler-panel.position-right #hide-panel-btn,
  670. #profiler-panel.position-left #floating-btn,
  671. #profiler-panel.position-left #maximize-btn,
  672. #profiler-panel.position-left #hide-panel-btn {
  673. transition: background-color 0.2s, color 0.2s;
  674. }
  675. #floating-btn:hover,
  676. #maximize-btn:hover,
  677. #hide-panel-btn:hover {
  678. background-color: rgba(255, 255, 255, 0.1);
  679. color: var(--text-primary);
  680. }
  681. /* Hide maximize button when there are no tabs */
  682. #profiler-panel.position-right.no-tabs #maximize-btn,
  683. #profiler-panel.position-left.no-tabs #maximize-btn,
  684. #profiler-panel.position-bottom.no-tabs #maximize-btn,
  685. #profiler-panel.position-top.no-tabs #maximize-btn {
  686. display: none !important;
  687. }
  688. .profiler-content-wrapper {
  689. flex-grow: 1;
  690. overflow: hidden;
  691. position: relative;
  692. }
  693. .profiler-content {
  694. position: absolute;
  695. top: 0;
  696. left: 0;
  697. width: 100%;
  698. height: 100%;
  699. overflow-y: auto;
  700. font-size: 13px;
  701. visibility: hidden;
  702. opacity: 0;
  703. transition: opacity 0.2s, visibility 0.2s;
  704. box-sizing: border-box;
  705. display: flex;
  706. flex-direction: column;
  707. user-select: none;
  708. -webkit-user-select: none;
  709. }
  710. .profiler-content.active {
  711. visibility: visible;
  712. opacity: 1;
  713. }
  714. .profiler-content {
  715. overflow: auto; /* make sure scrollbars can appear */
  716. }
  717. .profiler-content::-webkit-scrollbar {
  718. width: 8px;
  719. height: 8px;
  720. }
  721. .profiler-content::-webkit-scrollbar-track {
  722. background: transparent;
  723. }
  724. .profiler-content::-webkit-scrollbar-thumb {
  725. background-color: rgba(0, 0, 0, 0.25);
  726. border-radius: 10px;
  727. transition: background 0.3s ease;
  728. }
  729. .profiler-content::-webkit-scrollbar-thumb:hover {
  730. background-color: rgba(0, 0, 0, 0.4);
  731. }
  732. .profiler-content::-webkit-scrollbar-corner {
  733. background: transparent;
  734. }
  735. .profiler-content {
  736. scrollbar-width: thin; /* "auto" | "thin" */
  737. scrollbar-color: rgba(0, 0, 0, 0.25) transparent;
  738. }
  739. .list-item-row {
  740. display: grid;
  741. align-items: center;
  742. padding: 4px 8px;
  743. border-radius: 3px;
  744. transition: background-color 0.2s;
  745. gap: 10px;
  746. border-bottom: none;
  747. user-select: none;
  748. -webkit-user-select: none;
  749. min-height: 31px;
  750. }
  751. .list-item-wrapper {
  752. margin-top: 2px;
  753. margin-bottom: 2px;
  754. user-select: none;
  755. -webkit-user-select: none;
  756. }
  757. .list-item-wrapper:first-child {
  758. /*margin-top: 0;*/
  759. }
  760. .list-item-wrapper:not(.header-wrapper):nth-child(odd) > .list-item-row {
  761. background-color: rgba(0,0,0,0.1);
  762. }
  763. .list-item-wrapper.header-wrapper>.list-item-row {
  764. color: var(--accent-color);
  765. background-color: rgba(0, 170, 255, 0.1);
  766. }
  767. .list-item-wrapper.header-wrapper>.list-item-row>.list-item-cell:first-child {
  768. font-weight: 600;
  769. line-height: 1;
  770. }
  771. .list-item-row.collapsible,
  772. .list-item-row.actionable {
  773. cursor: pointer;
  774. }
  775. .list-item-row.collapsible {
  776. background-color: rgba(0, 170, 255, 0.15) !important;
  777. min-height: 23px;
  778. }
  779. .list-item-row.collapsible.alert,
  780. .list-item-row.alert {
  781. background-color: rgba(244, 67, 54, 0.1) !important;
  782. }
  783. @media (hover: hover) {
  784. .list-item-row:hover:not(.collapsible):not(.no-hover),
  785. .list-item-row:hover:not(.no-hover),
  786. .list-item-row.actionable:hover,
  787. .list-item-row.collapsible.actionable:hover {
  788. background-color: rgba(255, 255, 255, 0.05) !important;
  789. }
  790. .list-item-row.collapsible:hover {
  791. background-color: rgba(0, 170, 255, 0.25) !important;
  792. }
  793. }
  794. .list-item-cell {
  795. white-space: pre;
  796. display: flex;
  797. align-items: center;
  798. user-select: none;
  799. -webkit-user-select: none;
  800. }
  801. .list-item-cell:not(:first-child) {
  802. justify-content: flex-end;
  803. font-weight: 600;
  804. }
  805. .list-header {
  806. display: grid;
  807. align-items: center;
  808. padding: 4px 8px;
  809. font-weight: 600;
  810. color: var(--text-secondary);
  811. padding-bottom: 6px;
  812. border-bottom: 1px solid var(--profiler-border);
  813. margin-bottom: 5px;
  814. gap: 10px;
  815. user-select: none;
  816. -webkit-user-select: none;
  817. }
  818. .list-item-wrapper.section-start {
  819. margin-top: 5px;
  820. margin-bottom: 5px;
  821. }
  822. .list-header .list-header-cell:not(:first-child) {
  823. text-align: right;
  824. }
  825. .list-children-container {
  826. padding-left: 1.5em;
  827. overflow: hidden;
  828. transition: max-height 0.1s ease-out;
  829. margin-top: 2px;
  830. }
  831. .list-children-container.closed {
  832. max-height: 0;
  833. }
  834. .item-toggler {
  835. display: inline-block;
  836. margin-right: 0.8em;
  837. text-align: left;
  838. }
  839. .list-item-row.open .item-toggler::before {
  840. content: '-';
  841. }
  842. .list-item-row:not(.open) .item-toggler::before {
  843. content: '+';
  844. }
  845. .list-item-cell .value.good {
  846. color: var(--color-green);
  847. }
  848. .list-item-cell .value.warn {
  849. color: var(--color-yellow);
  850. }
  851. .list-item-cell .value.bad {
  852. color: var(--color-red);
  853. }
  854. .list-scroll-wrapper {
  855. overflow-x: auto;
  856. width: 100%;
  857. user-select: none;
  858. -webkit-user-select: none;
  859. }
  860. .list-container.parameters .list-item-row:not(.collapsible) {
  861. }
  862. .graph-container {
  863. width: 100%;
  864. box-sizing: border-box;
  865. padding: 8px 0;
  866. position: relative;
  867. }
  868. .graph-svg {
  869. width: 100%;
  870. height: 80px;
  871. background-color: var(--profiler-header);
  872. border: 1px solid var(--profiler-border);
  873. border-radius: 4px;
  874. }
  875. .graph-path {
  876. stroke-width: 2;
  877. fill-opacity: 0.4;
  878. }
  879. .console-header {
  880. padding: 10px;
  881. border-bottom: 1px solid var(--profiler-border);
  882. display: flex;
  883. gap: 20px;
  884. flex-shrink: 0;
  885. align-items: center;
  886. justify-content: space-between;
  887. }
  888. .console-filters-group {
  889. display: flex;
  890. gap: 20px;
  891. }
  892. .console-filter-input {
  893. background-color: var(--profiler-bg);
  894. border: 1px solid var(--profiler-border);
  895. color: var(--text-primary);
  896. border-radius: 4px;
  897. padding: 4px 8px;
  898. font-family: var(--font-mono);
  899. flex-grow: 1;
  900. max-width: 300px;
  901. border-radius: 15px;
  902. }
  903. #console-log {
  904. display: flex;
  905. flex-direction: column;
  906. gap: 4px;
  907. padding: 10px;
  908. overflow-y: auto;
  909. flex-grow: 1;
  910. }
  911. .log-message {
  912. padding: 2px 5px;
  913. white-space: pre-wrap;
  914. word-break: break-all;
  915. border-radius: 3px;
  916. line-height: 1.5 !important;
  917. }
  918. .log-message.hidden {
  919. display: none;
  920. }
  921. .log-message.info {
  922. color: var(--text-primary);
  923. }
  924. .log-message.warn {
  925. color: var(--color-yellow);
  926. }
  927. .log-message.error {
  928. color: #f9dedc;
  929. background-color: rgba(244, 67, 54, 0.1);
  930. }
  931. .log-prefix {
  932. color: var(--text-secondary);
  933. margin-right: 8px;
  934. }
  935. .log-code {
  936. background-color: rgba(255, 255, 255, 0.1);
  937. border-radius: 3px;
  938. padding: 1px 4px;
  939. }
  940. .thumbnail-container {
  941. display: flex;
  942. align-items: center;
  943. }
  944. .thumbnail-svg {
  945. width: 40px;
  946. height: 22.5px;
  947. flex-shrink: 0;
  948. margin-right: 8px;
  949. }
  950. .param-control {
  951. display: flex;
  952. align-items: center;
  953. justify-content: flex-end;
  954. gap: 10px;
  955. width: 100%;
  956. }
  957. .param-control input,
  958. .param-control select,
  959. .param-control button {
  960. background-color: var(--profiler-bg);
  961. border: 1px solid var(--profiler-border);
  962. color: var(--text-primary);
  963. border-radius: 4px;
  964. padding: 4px 6px;
  965. padding-bottom: 2px;
  966. font-family: var(--font-mono);
  967. width: 100%;
  968. box-sizing: border-box;
  969. }
  970. .param-control select {
  971. padding-top: 3px;
  972. padding-bottom: 1px;
  973. }
  974. .param-control input[type="number"] {
  975. cursor: ns-resize;
  976. }
  977. .param-control input[type="color"] {
  978. padding: 2px;
  979. }
  980. .param-control button {
  981. cursor: pointer;
  982. transition: background-color 0.2s;
  983. }
  984. .param-control button:hover {
  985. background-color: var(--profiler-header);
  986. }
  987. .param-control-vector {
  988. display: flex;
  989. gap: 5px;
  990. }
  991. .custom-checkbox {
  992. display: inline-flex;
  993. align-items: center;
  994. cursor: pointer;
  995. gap: 8px;
  996. }
  997. .custom-checkbox input {
  998. display: none;
  999. }
  1000. .custom-checkbox .checkmark {
  1001. width: 14px;
  1002. height: 14px;
  1003. border: 1px solid var(--profiler-border);
  1004. border-radius: 3px;
  1005. display: inline-flex;
  1006. justify-content: center;
  1007. align-items: center;
  1008. transition: background-color 0.2s, border-color 0.2s;
  1009. }
  1010. .custom-checkbox .checkmark::after {
  1011. content: '';
  1012. width: 8px;
  1013. height: 8px;
  1014. background-color: var(--accent-color);
  1015. border-radius: 1px;
  1016. display: block;
  1017. transform: scale(0);
  1018. transition: transform 0.2s;
  1019. }
  1020. .custom-checkbox input:checked+.checkmark {
  1021. border-color: var(--accent-color);
  1022. }
  1023. .custom-checkbox input:checked+.checkmark::after {
  1024. transform: scale(1);
  1025. }
  1026. .param-control input[type="range"] {
  1027. -webkit-appearance: none;
  1028. appearance: none;
  1029. width: 100%;
  1030. height: 16px;
  1031. background: var(--profiler-header);
  1032. border-radius: 5px;
  1033. border: 1px solid var(--profiler-border);
  1034. outline: none;
  1035. padding: 0px;
  1036. padding-top: 8px;
  1037. }
  1038. .param-control input[type="range"]::-webkit-slider-thumb {
  1039. -webkit-appearance: none;
  1040. appearance: none;
  1041. width: 18px;
  1042. height: 18px;
  1043. background: var(--profiler-bg);
  1044. border: 1px solid var(--accent-color);
  1045. border-radius: 3px;
  1046. cursor: pointer;
  1047. margin-top: -8px;
  1048. }
  1049. .param-control input[type="range"]::-moz-range-thumb {
  1050. width: 18px;
  1051. height: 18px;
  1052. background: var(--profiler-bg);
  1053. border: 2px solid var(--accent-color);
  1054. border-radius: 3px;
  1055. cursor: pointer;
  1056. }
  1057. .param-control input[type="range"]::-moz-range-track {
  1058. width: 100%;
  1059. height: 16px;
  1060. background: var(--profiler-header);
  1061. border-radius: 5px;
  1062. border: 1px solid var(--profiler-border);
  1063. }
  1064. /* Override .param-control styles for mini-panel-content */
  1065. .mini-panel-content input,
  1066. .mini-panel-content select,
  1067. .mini-panel-content button {
  1068. padding: 2px 4px;
  1069. height: 21px;
  1070. line-height: 1.4;
  1071. padding-top: 4px;
  1072. }
  1073. .mini-panel-content .param-control input,
  1074. .mini-panel-content .param-control select,
  1075. .mini-panel-content .param-control button {
  1076. background-color: #1e1e24c2;
  1077. }
  1078. .mini-panel-content .param-control select {
  1079. padding: 2px 2px;
  1080. padding-top: 3px;
  1081. }
  1082. .mini-panel-content .param-control input[type="number"]::-webkit-outer-spin-button,
  1083. .mini-panel-content .param-control input[type="number"]::-webkit-inner-spin-button {
  1084. -webkit-appearance: none;
  1085. margin: 0;
  1086. }
  1087. .mini-panel-content .param-control input[type="number"] {
  1088. -moz-appearance: textfield;
  1089. }
  1090. .mini-panel-content .list-item-cell span {
  1091. position: relative;
  1092. top: 1px;
  1093. margin-left: 2px;
  1094. }
  1095. .mini-panel-content .custom-checkbox .checkmark {
  1096. width: 12px;
  1097. height: 12px;
  1098. margin-bottom: 2px;
  1099. }
  1100. .mini-panel-content .custom-checkbox .checkmark::after {
  1101. width: 8px;
  1102. height: 8px;
  1103. }
  1104. .mini-panel-content .list-container.parameters .list-item-row:not(.collapsible) {
  1105. margin-bottom: 2px;
  1106. }
  1107. @media screen and (max-width: 450px) and (orientation: portrait) {
  1108. .console-filter-input {
  1109. max-width: 100px;
  1110. }
  1111. }
  1112. /* Touch device optimizations */
  1113. @media (hover: none) and (pointer: coarse) {
  1114. .panel-resizer {
  1115. top: -10px !important;
  1116. height: 20px !important;
  1117. }
  1118. #profiler-panel.position-top .panel-resizer {
  1119. top: auto !important;
  1120. bottom: -10px !important;
  1121. height: 20px !important;
  1122. }
  1123. #profiler-panel.position-left .panel-resizer {
  1124. right: -10px !important;
  1125. width: 20px !important;
  1126. height: 100% !important;
  1127. }
  1128. #profiler-panel.position-right .panel-resizer {
  1129. left: -10px !important;
  1130. width: 20px !important;
  1131. height: 100% !important;
  1132. }
  1133. .detached-tab-resizer-top,
  1134. .detached-tab-resizer-bottom {
  1135. height: 10px !important;
  1136. }
  1137. .detached-tab-resizer-left,
  1138. .detached-tab-resizer-right {
  1139. width: 10px !important;
  1140. }
  1141. }
  1142. .drag-preview-indicator {
  1143. position: fixed;
  1144. background-color: rgba(0, 170, 255, 0.2);
  1145. border: 2px dashed var(--accent-color);
  1146. z-index: 999;
  1147. pointer-events: none;
  1148. transition: all 0.2s ease-out;
  1149. }
  1150. /* Detached Tab Windows */
  1151. .detached-tab-panel {
  1152. position: fixed;
  1153. width: 500px;
  1154. height: 400px;
  1155. background: var(--profiler-bg);
  1156. border: 1px solid var(--profiler-border);
  1157. border-radius: 8px;
  1158. box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  1159. z-index: 1002;
  1160. display: flex;
  1161. flex-direction: column;
  1162. backdrop-filter: blur(10px);
  1163. overflow: hidden;
  1164. opacity: 1;
  1165. visibility: visible;
  1166. transition: opacity 0.2s, visibility 0.2s;
  1167. }
  1168. #profiler-panel:not(.visible) ~ * .detached-tab-panel,
  1169. body:has(#profiler-panel:not(.visible)) .detached-tab-panel {
  1170. opacity: 0;
  1171. visibility: hidden;
  1172. pointer-events: none;
  1173. }
  1174. .detached-tab-header {
  1175. background: var(--profiler-header-bg);
  1176. padding: 0 7px 0 15px;
  1177. font-family: var(--font-family);
  1178. font-size: 14px;
  1179. color: var(--text-primary);
  1180. font-weight: 600;
  1181. display: flex;
  1182. justify-content: space-between;
  1183. align-items: center;
  1184. border-bottom: 1px solid var(--profiler-border);
  1185. cursor: grab;
  1186. user-select: none;
  1187. height: 38px;
  1188. flex-shrink: 0;
  1189. -webkit-font-smoothing: antialiased;
  1190. -moz-osx-font-smoothing: grayscale;
  1191. touch-action: none;
  1192. }
  1193. .detached-tab-header:active {
  1194. cursor: grabbing;
  1195. }
  1196. .detached-header-controls {
  1197. display: flex;
  1198. gap: 5px;
  1199. }
  1200. .detached-reattach-btn {
  1201. background: transparent;
  1202. border: none;
  1203. color: var(--text-secondary);
  1204. font-family: var(--font-family);
  1205. font-size: 18px;
  1206. line-height: 1;
  1207. cursor: pointer;
  1208. padding: 4px 8px;
  1209. border-radius: 4px;
  1210. transition: all 0.2s;
  1211. display: flex;
  1212. align-items: center;
  1213. justify-content: center;
  1214. -webkit-font-smoothing: antialiased;
  1215. -moz-osx-font-smoothing: grayscale;
  1216. }
  1217. .detached-reattach-btn:hover {
  1218. background: rgba(0, 170, 255, 0.2);
  1219. color: var(--accent-color);
  1220. }
  1221. .detached-tab-content {
  1222. flex: 1;
  1223. overflow: auto;
  1224. position: relative;
  1225. background: var(--profiler-bg);
  1226. }
  1227. .detached-tab-content::-webkit-scrollbar {
  1228. width: 8px;
  1229. height: 8px;
  1230. }
  1231. .detached-tab-content::-webkit-scrollbar-track {
  1232. background: transparent;
  1233. }
  1234. .detached-tab-content::-webkit-scrollbar-thumb {
  1235. background-color: rgba(0, 0, 0, 0.25);
  1236. border-radius: 10px;
  1237. transition: background 0.3s ease;
  1238. }
  1239. .detached-tab-content::-webkit-scrollbar-thumb:hover {
  1240. background-color: rgba(0, 0, 0, 0.4);
  1241. }
  1242. .detached-tab-content::-webkit-scrollbar-corner {
  1243. background: transparent;
  1244. }
  1245. .detached-tab-content .profiler-content {
  1246. display: block !important;
  1247. height: 100%;
  1248. visibility: visible !important;
  1249. opacity: 1 !important;
  1250. position: relative !important;
  1251. }
  1252. .detached-tab-content .profiler-content > * {
  1253. font-family: var(--font-mono);
  1254. color: var(--text-primary);
  1255. }
  1256. .detached-tab-resizer {
  1257. position: absolute;
  1258. bottom: 0;
  1259. right: 0;
  1260. width: 20px;
  1261. height: 20px;
  1262. cursor: nwse-resize;
  1263. z-index: 10;
  1264. touch-action: none;
  1265. }
  1266. .detached-tab-resizer::after {
  1267. content: '';
  1268. position: absolute;
  1269. bottom: 2px;
  1270. right: 2px;
  1271. width: 12px;
  1272. height: 12px;
  1273. border-right: 2px solid var(--profiler-border);
  1274. border-bottom: 2px solid var(--profiler-border);
  1275. border-bottom-right-radius: 6px;
  1276. opacity: 0.5;
  1277. }
  1278. .detached-tab-resizer:hover::after {
  1279. opacity: 1;
  1280. border-color: var(--accent-color);
  1281. }
  1282. /* Edge resizers */
  1283. .detached-tab-resizer-top {
  1284. position: absolute;
  1285. top: 0;
  1286. left: 0;
  1287. right: 0;
  1288. height: 5px;
  1289. cursor: ns-resize;
  1290. z-index: 10;
  1291. touch-action: none;
  1292. }
  1293. .detached-tab-resizer-right {
  1294. position: absolute;
  1295. top: 0;
  1296. right: 0;
  1297. bottom: 0;
  1298. width: 5px;
  1299. cursor: ew-resize;
  1300. z-index: 10;
  1301. touch-action: none;
  1302. }
  1303. .detached-tab-resizer-bottom {
  1304. position: absolute;
  1305. bottom: 0;
  1306. left: 0;
  1307. right: 0;
  1308. height: 5px;
  1309. cursor: ns-resize;
  1310. z-index: 10;
  1311. touch-action: none;
  1312. }
  1313. .detached-tab-resizer-left {
  1314. position: absolute;
  1315. top: 0;
  1316. left: 0;
  1317. bottom: 0;
  1318. width: 5px;
  1319. cursor: ew-resize;
  1320. z-index: 10;
  1321. touch-action: none;
  1322. }
  1323. /* Input number spin buttons - hide arrows */
  1324. /* Chrome, Safari, Edge, Opera */
  1325. #profiler-panel input[type="number"]::-webkit-outer-spin-button,
  1326. #profiler-panel input[type="number"]::-webkit-inner-spin-button,
  1327. .detached-tab-content input[type="number"]::-webkit-outer-spin-button,
  1328. .detached-tab-content input[type="number"]::-webkit-inner-spin-button {
  1329. -webkit-appearance: none;
  1330. margin: 0;
  1331. }
  1332. /* Firefox */
  1333. #profiler-panel input[type="number"],
  1334. .detached-tab-content input[type="number"] {
  1335. -moz-appearance: textfield;
  1336. }
  1337. `;
  1338. const styleElement = document.createElement( 'style' );
  1339. styleElement.id = 'profiler-styles';
  1340. styleElement.textContent = css;
  1341. document.head.appendChild( styleElement );
  1342. }
  1343. }
粤ICP备19079148号