style.css 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832
  1. /* general gradio fixes */
  2. :root, .dark{
  3. --checkbox-label-gap: 0.25em 0.1em;
  4. --section-header-text-size: 12pt;
  5. --block-background-fill: transparent;
  6. }
  7. .block.padded:not(.gradio-accordion) {
  8. padding: 0 !important;
  9. }
  10. div.gradio-container{
  11. max-width: unset !important;
  12. }
  13. .hidden{
  14. display: none;
  15. }
  16. .compact{
  17. background: transparent !important;
  18. padding: 0 !important;
  19. }
  20. div.form{
  21. border-width: 0;
  22. box-shadow: none;
  23. background: transparent;
  24. overflow: visible;
  25. gap: 0.5em;
  26. }
  27. .block.gradio-dropdown,
  28. .block.gradio-slider,
  29. .block.gradio-checkbox,
  30. .block.gradio-textbox,
  31. .block.gradio-radio,
  32. .block.gradio-checkboxgroup,
  33. .block.gradio-number,
  34. .block.gradio-colorpicker
  35. {
  36. border-width: 0 !important;
  37. box-shadow: none !important;
  38. }
  39. .gap.compact{
  40. padding: 0;
  41. gap: 0.2em 0;
  42. }
  43. div.compact{
  44. gap: 1em;
  45. }
  46. .gradio-dropdown label span:not(.has-info),
  47. .gradio-textbox label span:not(.has-info),
  48. .gradio-number label span:not(.has-info)
  49. {
  50. margin-bottom: 0;
  51. }
  52. .gradio-dropdown ul.options{
  53. z-index: 3000;
  54. min-width: fit-content;
  55. max-width: inherit;
  56. white-space: nowrap;
  57. }
  58. .gradio-dropdown ul.options li.item {
  59. padding: 0.05em 0;
  60. }
  61. .gradio-dropdown ul.options li.item.selected {
  62. background-color: var(--neutral-100);
  63. }
  64. .dark .gradio-dropdown ul.options li.item.selected {
  65. background-color: var(--neutral-900);
  66. }
  67. .gradio-dropdown div.wrap.wrap.wrap.wrap{
  68. box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  69. }
  70. .gradio-dropdown:not(.multiselect) .wrap-inner.wrap-inner.wrap-inner{
  71. flex-wrap: unset;
  72. }
  73. .gradio-dropdown .single-select{
  74. white-space: nowrap;
  75. overflow: hidden;
  76. }
  77. .gradio-dropdown .token-remove.remove-all.remove-all{
  78. display: none;
  79. }
  80. .gradio-dropdown.multiselect .token-remove.remove-all.remove-all{
  81. display: flex;
  82. }
  83. .gradio-slider input[type="number"]{
  84. width: 6em;
  85. }
  86. .block.gradio-checkbox {
  87. margin: 0.75em 1.5em 0 0;
  88. }
  89. .gradio-html div.wrap{
  90. height: 100%;
  91. }
  92. div.gradio-html.min{
  93. min-height: 0;
  94. }
  95. .block.gradio-gallery{
  96. background: var(--input-background-fill);
  97. }
  98. .gradio-container .prose a, .gradio-container .prose a:visited{
  99. color: unset;
  100. text-decoration: none;
  101. }
  102. /* general styled components */
  103. .gradio-button.tool{
  104. max-width: 2.2em;
  105. min-width: 2.2em !important;
  106. height: 2.4em;
  107. align-self: end;
  108. line-height: 1em;
  109. border-radius: 0.5em;
  110. }
  111. .gradio-button.secondary-down{
  112. background: var(--button-secondary-background-fill);
  113. color: var(--button-secondary-text-color);
  114. }
  115. .gradio-button.secondary-down, .gradio-button.secondary-down:hover{
  116. box-shadow: 1px 1px 1px rgba(0,0,0,0.25) inset, 0px 0px 3px rgba(0,0,0,0.15) inset;
  117. }
  118. .gradio-button.secondary-down:hover{
  119. background: var(--button-secondary-background-fill-hover);
  120. color: var(--button-secondary-text-color-hover);
  121. }
  122. .checkboxes-row{
  123. margin-bottom: 0.5em;
  124. margin-left: 0em;
  125. }
  126. .checkboxes-row > div{
  127. flex: 0;
  128. white-space: nowrap;
  129. min-width: auto;
  130. }
  131. button.custom-button{
  132. border-radius: var(--button-large-radius);
  133. padding: var(--button-large-padding);
  134. font-weight: var(--button-large-text-weight);
  135. border: var(--button-border-width) solid var(--button-secondary-border-color);
  136. background: var(--button-secondary-background-fill);
  137. color: var(--button-secondary-text-color);
  138. font-size: var(--button-large-text-size);
  139. display: inline-flex;
  140. justify-content: center;
  141. align-items: center;
  142. transition: var(--button-transition);
  143. box-shadow: var(--button-shadow);
  144. text-align: center;
  145. }
  146. /* txt2img/img2img specific */
  147. .block.token-counter{
  148. position: absolute;
  149. display: inline-block;
  150. right: 1em;
  151. min-width: 0 !important;
  152. width: auto;
  153. z-index: 100;
  154. top: -0.75em;
  155. }
  156. .block.token-counter span{
  157. background: var(--input-background-fill) !important;
  158. box-shadow: 0 0 0.0 0.3em rgba(192,192,192,0.15), inset 0 0 0.6em rgba(192,192,192,0.075);
  159. border: 2px solid rgba(192,192,192,0.4) !important;
  160. border-radius: 0.4em;
  161. }
  162. .block.token-counter.error span{
  163. box-shadow: 0 0 0.0 0.3em rgba(255,0,0,0.15), inset 0 0 0.6em rgba(255,0,0,0.075);
  164. border: 2px solid rgba(255,0,0,0.4) !important;
  165. }
  166. .block.token-counter div{
  167. display: inline;
  168. }
  169. .block.token-counter span{
  170. padding: 0.1em 0.75em;
  171. }
  172. [id$=_subseed_show]{
  173. min-width: auto !important;
  174. flex-grow: 0 !important;
  175. display: flex;
  176. }
  177. [id$=_subseed_show] label{
  178. margin-bottom: 0.5em;
  179. align-self: end;
  180. }
  181. .performance {
  182. font-size: 0.85em;
  183. color: #444;
  184. }
  185. .performance p{
  186. display: inline-block;
  187. }
  188. .performance .time {
  189. margin-right: 0;
  190. }
  191. .performance .vram {
  192. }
  193. #txt2img_generate, #img2img_generate {
  194. min-height: 4.5em;
  195. }
  196. @media screen and (min-width: 2500px) {
  197. #txt2img_gallery, #img2img_gallery {
  198. min-height: 768px;
  199. }
  200. }
  201. #txt2img_gallery img, #img2img_gallery img{
  202. object-fit: scale-down;
  203. }
  204. #txt2img_actions_column, #img2img_actions_column {
  205. gap: 0.5em;
  206. }
  207. #txt2img_tools, #img2img_tools{
  208. gap: 0.4em;
  209. }
  210. .interrogate-col{
  211. min-width: 0 !important;
  212. max-width: fit-content;
  213. gap: 0.5em;
  214. }
  215. .interrogate-col > button{
  216. flex: 1;
  217. }
  218. .generate-box{
  219. position: relative;
  220. }
  221. .gradio-button.generate-box-skip, .gradio-button.generate-box-interrupt{
  222. position: absolute;
  223. width: 50%;
  224. height: 100%;
  225. display: none;
  226. background: #b4c0cc;
  227. }
  228. .gradio-button.generate-box-skip:hover, .gradio-button.generate-box-interrupt:hover{
  229. background: #c2cfdb;
  230. }
  231. .gradio-button.generate-box-interrupt{
  232. left: 0;
  233. border-radius: 0.5rem 0 0 0.5rem;
  234. }
  235. .gradio-button.generate-box-skip{
  236. right: 0;
  237. border-radius: 0 0.5rem 0.5rem 0;
  238. }
  239. #txtimg_hr_finalres{
  240. min-height: 0 !important;
  241. padding: .625rem .75rem;
  242. margin-left: -0.75em
  243. }
  244. #txtimg_hr_finalres .resolution{
  245. font-weight: bold;
  246. }
  247. .inactive{
  248. opacity: 0.5;
  249. }
  250. [id$=_column_batch]{
  251. min-width: min(13.5em, 100%) !important;
  252. }
  253. div.dimensions-tools{
  254. min-width: 0 !important;
  255. max-width: fit-content;
  256. flex-direction: row;
  257. align-content: center;
  258. }
  259. #mode_img2img .gradio-image > div.fixed-height, #mode_img2img .gradio-image > div.fixed-height img{
  260. height: 480px !important;
  261. max-height: 480px !important;
  262. min-height: 480px !important;
  263. }
  264. #img2img_sketch, #img2maskimg, #inpaint_sketch {
  265. overflow: overlay !important;
  266. resize: auto;
  267. background: var(--panel-background-fill);
  268. z-index: 5;
  269. }
  270. .image-buttons button{
  271. min-width: auto;
  272. }
  273. .infotext {
  274. overflow-wrap: break-word;
  275. }
  276. /* settings */
  277. #quicksettings {
  278. width: fit-content;
  279. align-items: end;
  280. }
  281. #quicksettings > div, #quicksettings > fieldset{
  282. max-width: 24em;
  283. min-width: 24em;
  284. padding: 0;
  285. border: none;
  286. box-shadow: none;
  287. background: none;
  288. }
  289. #settings{
  290. display: block;
  291. }
  292. #settings > div{
  293. border: none;
  294. margin-left: 10em;
  295. }
  296. #settings > div.tab-nav{
  297. float: left;
  298. display: block;
  299. margin-left: 0;
  300. width: 10em;
  301. }
  302. #settings > div.tab-nav button{
  303. display: block;
  304. border: none;
  305. text-align: left;
  306. white-space: initial;
  307. }
  308. #settings_result{
  309. height: 1.4em;
  310. margin: 0 1.2em;
  311. }
  312. /* live preview */
  313. .progressDiv{
  314. position: relative;
  315. height: 20px;
  316. background: #b4c0cc;
  317. border-radius: 3px !important;
  318. margin-bottom: -3px;
  319. }
  320. .dark .progressDiv{
  321. background: #424c5b;
  322. }
  323. .progressDiv .progress{
  324. width: 0%;
  325. height: 20px;
  326. background: #0060df;
  327. color: white;
  328. font-weight: bold;
  329. line-height: 20px;
  330. padding: 0 8px 0 0;
  331. text-align: right;
  332. border-radius: 3px;
  333. overflow: visible;
  334. white-space: nowrap;
  335. padding: 0 0.5em;
  336. }
  337. .livePreview{
  338. position: absolute;
  339. z-index: 300;
  340. background-color: white;
  341. margin: -4px;
  342. }
  343. .dark .livePreview{
  344. background-color: rgb(17 24 39 / var(--tw-bg-opacity));
  345. }
  346. .livePreview img{
  347. position: absolute;
  348. object-fit: contain;
  349. width: 100%;
  350. height: 100%;
  351. }
  352. /* fullscreen popup (ie in Lora's (i) button) */
  353. .popup-metadata{
  354. color: black;
  355. background: white;
  356. display: inline-block;
  357. padding: 1em;
  358. white-space: pre-wrap;
  359. }
  360. .global-popup{
  361. display: flex;
  362. position: fixed;
  363. z-index: 1001;
  364. left: 0;
  365. top: 0;
  366. width: 100%;
  367. height: 100%;
  368. overflow: auto;
  369. background-color: rgba(20, 20, 20, 0.95);
  370. }
  371. .global-popup-close:before {
  372. content: "×";
  373. }
  374. .global-popup-close{
  375. position: fixed;
  376. right: 0.25em;
  377. top: 0;
  378. cursor: pointer;
  379. color: white;
  380. font-size: 32pt;
  381. }
  382. .global-popup-inner{
  383. display: inline-block;
  384. margin: auto;
  385. padding: 2em;
  386. }
  387. /* fullpage image viewer */
  388. #lightboxModal{
  389. display: none;
  390. position: fixed;
  391. z-index: 1001;
  392. left: 0;
  393. top: 0;
  394. width: 100%;
  395. height: 100%;
  396. overflow: auto;
  397. background-color: rgba(20, 20, 20, 0.95);
  398. user-select: none;
  399. -webkit-user-select: none;
  400. flex-direction: column;
  401. }
  402. .modalControls {
  403. display: flex;
  404. gap: 1em;
  405. padding: 1em;
  406. background-color: rgba(0,0,0,0.2);
  407. }
  408. .modalClose {
  409. margin-left: auto;
  410. }
  411. .modalControls span{
  412. color: white;
  413. font-size: 35px;
  414. font-weight: bold;
  415. cursor: pointer;
  416. width: 1em;
  417. }
  418. .modalControls span:hover, .modalControls span:focus{
  419. color: #999;
  420. text-decoration: none;
  421. }
  422. #lightboxModal > img {
  423. display: block;
  424. margin: auto;
  425. width: auto;
  426. }
  427. #lightboxModal > img.modalImageFullscreen{
  428. object-fit: contain;
  429. height: 100%;
  430. }
  431. .modalPrev,
  432. .modalNext {
  433. cursor: pointer;
  434. position: absolute;
  435. top: 50%;
  436. width: auto;
  437. padding: 16px;
  438. margin-top: -50px;
  439. color: white;
  440. font-weight: bold;
  441. font-size: 20px;
  442. transition: 0.6s ease;
  443. border-radius: 0 3px 3px 0;
  444. user-select: none;
  445. -webkit-user-select: none;
  446. }
  447. .modalNext {
  448. right: 0;
  449. border-radius: 3px 0 0 3px;
  450. }
  451. .modalPrev:hover,
  452. .modalNext:hover {
  453. background-color: rgba(0, 0, 0, 0.8);
  454. }
  455. #imageARPreview {
  456. position: absolute;
  457. top: 0px;
  458. left: 0px;
  459. border: 2px solid red;
  460. background: rgba(255, 0, 0, 0.3);
  461. z-index: 900;
  462. pointer-events: none;
  463. display: none;
  464. }
  465. /* context menu (ie for the generate button) */
  466. #context-menu{
  467. z-index:9999;
  468. position:absolute;
  469. display:block;
  470. padding:0px 0;
  471. border:2px solid #a55000;
  472. border-radius:8px;
  473. box-shadow:1px 1px 2px #CE6400;
  474. width: 200px;
  475. }
  476. .context-menu-items{
  477. list-style: none;
  478. margin: 0;
  479. padding: 0;
  480. }
  481. .context-menu-items a{
  482. display:block;
  483. padding:5px;
  484. cursor:pointer;
  485. }
  486. .context-menu-items a:hover{
  487. background: #a55000;
  488. }
  489. /* extensions */
  490. #tab_extensions table{
  491. border-collapse: collapse;
  492. }
  493. #tab_extensions table td, #tab_extensions table th{
  494. border: 1px solid #ccc;
  495. padding: 0.25em 0.5em;
  496. }
  497. #tab_extensions table input[type="checkbox"]{
  498. margin-right: 0.5em;
  499. appearance: checkbox;
  500. }
  501. #tab_extensions button{
  502. max-width: 16em;
  503. }
  504. #tab_extensions input[disabled="disabled"]{
  505. opacity: 0.5;
  506. }
  507. .extension-tag{
  508. font-weight: bold;
  509. font-size: 95%;
  510. }
  511. #available_extensions .info{
  512. margin: 0;
  513. }
  514. #available_extensions .date_added{
  515. opacity: 0.85;
  516. font-size: 90%;
  517. }
  518. /* replace original footer with ours */
  519. footer {
  520. display: none !important;
  521. }
  522. #footer{
  523. text-align: center;
  524. }
  525. #footer div{
  526. display: inline-block;
  527. }
  528. #footer .versions{
  529. font-size: 85%;
  530. opacity: 0.85;
  531. }
  532. /* extra networks UI */
  533. .extra-networks > div > [id *= '_extra_']{
  534. margin: 0.3em;
  535. }
  536. .extra-network-subdirs{
  537. padding: 0.2em 0.35em;
  538. }
  539. .extra-network-subdirs button{
  540. margin: 0 0.15em;
  541. }
  542. .extra-networks .tab-nav .search{
  543. display: inline-block;
  544. max-width: 16em;
  545. margin: 0.3em;
  546. align-self: center;
  547. width: 16em;
  548. }
  549. #txt2img_extra_view, #img2img_extra_view {
  550. width: auto;
  551. }
  552. .extra-network-cards .nocards, .extra-network-thumbs .nocards{
  553. margin: 1.25em 0.5em 0.5em 0.5em;
  554. }
  555. .extra-network-cards .nocards h1, .extra-network-thumbs .nocards h1{
  556. font-size: 1.5em;
  557. margin-bottom: 1em;
  558. }
  559. .extra-network-cards .nocards li, .extra-network-thumbs .nocards li{
  560. margin-left: 0.5em;
  561. }
  562. .extra-network-cards .card .metadata-button:before, .extra-network-thumbs .card .metadata-button:before{
  563. content: "🛈";
  564. }
  565. .extra-network-cards .card .metadata-button, .extra-network-thumbs .card .metadata-button{
  566. display: none;
  567. position: absolute;
  568. right: 0;
  569. color: white;
  570. text-shadow: 2px 2px 3px black;
  571. padding: 0.25em;
  572. font-size: 22pt;
  573. width: 1.5em;
  574. }
  575. .extra-network-cards .card:hover .metadata-button, .extra-network-thumbs .card:hover .metadata-button{
  576. display: inline-block;
  577. }
  578. .extra-network-cards .card .metadata-button:hover, .extra-network-thumbs .card .metadata-button:hover{
  579. color: red;
  580. }
  581. .extra-network-thumbs {
  582. display: flex;
  583. flex-flow: row wrap;
  584. gap: 10px;
  585. }
  586. .extra-network-thumbs .card {
  587. height: 6em;
  588. width: 6em;
  589. cursor: pointer;
  590. background-image: url('./file=html/card-no-preview.png');
  591. background-size: cover;
  592. background-position: center center;
  593. position: relative;
  594. }
  595. .extra-network-thumbs .card:hover .additional a {
  596. display: inline-block;
  597. }
  598. .extra-network-thumbs .actions .additional a {
  599. background-image: url('./file=html/image-update.svg');
  600. background-repeat: no-repeat;
  601. background-size: cover;
  602. background-position: center center;
  603. position: absolute;
  604. top: 0;
  605. left: 0;
  606. width: 24px;
  607. height: 24px;
  608. display: none;
  609. font-size: 0;
  610. text-align: -9999;
  611. }
  612. .extra-network-thumbs .actions .name {
  613. position: absolute;
  614. bottom: 0;
  615. font-size: 10px;
  616. padding: 3px;
  617. width: 100%;
  618. overflow: hidden;
  619. white-space: nowrap;
  620. text-overflow: ellipsis;
  621. background: rgba(0,0,0,.5);
  622. color: white;
  623. }
  624. .extra-network-thumbs .card:hover .actions .name {
  625. white-space: normal;
  626. word-break: break-all;
  627. }
  628. .extra-network-cards .card{
  629. display: inline-block;
  630. margin: 0.5em;
  631. width: 16em;
  632. height: 24em;
  633. box-shadow: 0 0 5px rgba(128, 128, 128, 0.5);
  634. border-radius: 0.2em;
  635. position: relative;
  636. background-size: auto 100%;
  637. background-position: center;
  638. overflow: hidden;
  639. cursor: pointer;
  640. background-image: url('./file=html/card-no-preview.png')
  641. }
  642. .extra-network-cards .card:hover{
  643. box-shadow: 0 0 2px 0.3em rgba(0, 128, 255, 0.35);
  644. }
  645. .extra-network-cards .card .actions .additional{
  646. display: none;
  647. }
  648. .extra-network-cards .card .actions{
  649. position: absolute;
  650. bottom: 0;
  651. left: 0;
  652. right: 0;
  653. padding: 0.5em;
  654. background: rgba(0,0,0,0.5);
  655. box-shadow: 0 0 0.25em 0.25em rgba(0,0,0,0.5);
  656. text-shadow: 0 0 0.2em black;
  657. }
  658. .extra-network-cards .card .actions *{
  659. color: white;
  660. }
  661. .extra-network-cards .card .actions:hover{
  662. box-shadow: 0 0 0.75em 0.75em rgba(0,0,0,0.5) !important;
  663. }
  664. .extra-network-cards .card .actions .name{
  665. font-size: 1.7em;
  666. font-weight: bold;
  667. line-break: anywhere;
  668. }
  669. .extra-network-cards .card .actions .description {
  670. display: block;
  671. max-height: 3em;
  672. white-space: pre-wrap;
  673. line-height: 1.1;
  674. }
  675. .extra-network-cards .card .actions .description:hover {
  676. max-height: none;
  677. }
  678. .extra-network-cards .card .actions:hover .additional{
  679. display: block;
  680. }
  681. .extra-network-cards .card ul{
  682. margin: 0.25em 0 0.75em 0.25em;
  683. cursor: unset;
  684. }
  685. .extra-network-cards .card ul a{
  686. cursor: pointer;
  687. }
  688. .extra-network-cards .card ul a:hover{
  689. color: red;
  690. }