Spaces:
Running
Running
| /* ── inputs global ── */ | |
| textarea, input[type="text"] { border-radius: 10px ; font-size: 15px ; } | |
| /* ── code blocks ── */ | |
| #hy-chat pre { | |
| background: #f5f5f7 ; | |
| border: 1px solid #ebebeb ; | |
| border-radius: 8px ; | |
| padding: 14px 18px ; | |
| font-size: 13px ; | |
| line-height: 1.6 ; | |
| overflow-x: auto ; | |
| margin: 0.8em 0 ; | |
| } | |
| .dark #hy-chat pre { | |
| background: #111 ; | |
| border-color: #2a2a2a ; | |
| } | |
| #hy-chat code { | |
| font-family: "SF Mono", "Fira Code", "JetBrains Mono", "Consolas", "Monaco", monospace ; | |
| font-size: 0.9em ; | |
| } | |
| .dark #hy-chat code { | |
| color: #d4d4d4 ; | |
| } | |
| #hy-chat :not(pre) > code { | |
| background: #f0f0f3 ; | |
| padding: 2px 6px ; | |
| border-radius: 4px ; | |
| color: #333 ; | |
| } | |
| .dark #hy-chat :not(pre) > code { | |
| background: #2a2a2a ; | |
| color: #d4d4d4 ; | |
| } | |
| /* ── blockquote ── */ | |
| #hy-chat blockquote { | |
| border-left: 3px solid #d1d1d6 ; | |
| margin: 0.8em 0 ; | |
| padding: 4px 16px ; | |
| color: #555 ; | |
| background: transparent ; | |
| } | |
| .dark #hy-chat blockquote { | |
| border-left-color: #3a3a3a ; | |
| color: #909090 ; | |
| } | |
| /* ── tables ── | |
| * Markdown tables otherwise render with ``display: table`` and | |
| * intrinsic auto sizing, which lets a wide table push past the | |
| * message's ``max-width: 95%`` and overflow ``#hy-chat`` horizontally. | |
| * Beyond the obvious horizontal-clip ugliness, the post-stream column- | |
| * width pass (browser re-measures cells once all rows are in) was | |
| * leaving ``#hy-chat``'s ``scrollHeight`` desynced from real layout — | |
| * the user could drag the scrollbar to the bottom of its track without | |
| * reaching the actual last row of the answer, and the wheel was dead | |
| * because they really were at the (stale) max scrollTop. | |
| * | |
| * The fix is to (a) keep the table inside the message bubble and | |
| * (b) make any too-wide table scroll horizontally inside ITS OWN | |
| * bounds rather than the row's: | |
| * - ``display: block`` + ``max-width: 100%`` + ``overflow-x: auto`` | |
| * makes the ``<table>`` itself a horizontally-scrollable inline | |
| * box; column widths are still auto-computed but the layout | |
| * impact stays inside the table. | |
| * - ``border-collapse: collapse`` + light borders give it the | |
| * conventional spreadsheet look without adding cell-spacing | |
| * surprises that browsers handle inconsistently. */ | |
| #hy-chat table { | |
| display: block ; | |
| width: max-content ; | |
| max-width: 100% ; | |
| overflow-x: auto ; | |
| border-collapse: collapse ; | |
| margin: 0.8em 0 ; | |
| font-size: 14px ; | |
| } | |
| #hy-chat th, | |
| #hy-chat td { | |
| border: 1px solid #e5e5ea ; | |
| padding: 6px 12px ; | |
| text-align: left ; | |
| vertical-align: top ; | |
| } | |
| #hy-chat th { | |
| background: #f5f5f7 ; | |
| font-weight: 600 ; | |
| } | |
| .dark #hy-chat th, | |
| .dark #hy-chat td { | |
| border-color: #333 ; | |
| } | |
| .dark #hy-chat th { | |
| background: #1f1f1f ; | |
| } | |
| /* ── hr ── */ | |
| #hy-chat hr { | |
| border: none ; | |
| border-top: 1px solid #e5e5ea ; | |
| margin: 1.2em 0 ; | |
| } | |
| .dark #hy-chat hr { | |
| border-top-color: #2a2a2a ; | |
| } | |
| /* ── slider progress ── */ | |
| .gradio-container input[type="range"]::-moz-range-progress { background-color: #2563eb ; } | |
| .gradio-container input[type="range"]::-moz-range-track { background: #e5e7eb ; } | |