Download public/css/chat.css from sharktide/chat: direct link, hf CLI and curl.
- Browser
- Download file 15.4 kB
-
https://huggingface.co/spaces/sharktide/chat/resolve/4768abbbdecf41e23cfb355c840cc44d0e952929/public/css/chat.css
- Command line
-
hf download hf://spaces/sharktide/chat@4768abbbdecf41e23cfb355c840cc44d0e952929/public/css/chat.css
-
curl -L -o chat.css https://huggingface.co/spaces/sharktide/chat/resolve/4768abbbdecf41e23cfb355c840cc44d0e952929/public/css/chat.css
15.4 kB
| /* ββ Main layout βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ */ | |
| #main { | |
| flex: 1; | |
| min-width: 0; | |
| display: flex; | |
| flex-direction: column; | |
| height: 100vh; | |
| overflow: hidden; | |
| position: relative; | |
| } | |
| /* ββ Welcome view ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ */ | |
| .welcome-view { | |
| flex: 1; | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| justify-content: center; | |
| padding: 40px 24px; | |
| gap: 32px; | |
| min-height: 0; | |
| overflow: hidden; | |
| } | |
| .welcome-title { | |
| font-size: clamp(26px, 4vw, 44px); | |
| font-weight: 300; | |
| letter-spacing: -0.03em; | |
| color: var(--text); | |
| text-align: center; | |
| } | |
| .welcome-input-wrap { | |
| width: 100%; | |
| max-width: 760px; | |
| } | |
| /* ββ Chat view βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ */ | |
| .chat-view { | |
| flex: 1; | |
| min-height: 0; | |
| overflow-y: auto; | |
| overflow-x: hidden; | |
| padding: 24px 0 8px; | |
| display: flex; | |
| flex-direction: column; | |
| } | |
| .chat-messages { | |
| width: 100%; | |
| max-width: 780px; | |
| margin: 0 auto; | |
| padding: 0 24px; | |
| display: flex; | |
| flex-direction: column; | |
| gap: 4px; | |
| } | |
| /* ββ Message group βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ */ | |
| .msg-group { | |
| display: flex; | |
| flex-direction: column; | |
| gap: 0; | |
| position: relative; | |
| /* Extra bottom space so action buttons don't clip into next group */ | |
| margin-bottom: 18px; | |
| } | |
| /* User bubble β aligned right */ | |
| .msg-user { | |
| align-self: flex-end; | |
| max-width: 78%; | |
| padding: 10px 16px; | |
| background: var(--bg-raised); | |
| border: 1px solid var(--border); | |
| border-radius: 18px 18px 4px 18px; | |
| font-size: 15px; | |
| color: var(--text); | |
| word-break: break-word; | |
| position: relative; | |
| } | |
| /* User bubble editing state */ | |
| .msg-user.editing-user { | |
| max-width: 86%; | |
| width: 86%; | |
| align-self: flex-end; | |
| border-radius: var(--radius-lg); | |
| border-color: rgba(74,158,255,0.4); | |
| box-shadow: 0 0 0 2px rgba(74,158,255,0.08); | |
| padding: 12px 14px 10px; | |
| } | |
| /* Assistant bubble - transparent */ | |
| .msg-assistant { | |
| align-self: flex-start; | |
| max-width: 92%; | |
| padding: 4px 0; | |
| font-size: 15px; | |
| color: var(--text); | |
| word-break: break-word; | |
| position: relative; | |
| } | |
| /* Assistant editing state */ | |
| .msg-assistant.editing { | |
| background: rgba(255,255,255,0.04); | |
| border: 1px solid var(--border-bright); | |
| border-radius: var(--radius-lg); | |
| padding: 14px 16px 52px; | |
| width: 100%; | |
| max-width: 100%; | |
| box-shadow: 0 0 0 2px rgba(74,158,255,0.1); | |
| } | |
| /* ββ Version navigator βββββββββββββββββββββββββββββββββββββββββββββββββββββ */ | |
| /* | |
| * Sits BELOW the user bubble, right-aligned, always visible when present. | |
| * (Version nav is only added to user messages.) | |
| */ | |
| .msg-version-nav { | |
| align-self: flex-end; | |
| display: flex; | |
| align-items: center; | |
| gap: 2px; | |
| font-size: 12px; | |
| color: var(--text-muted); | |
| margin-top: 3px; | |
| /* Always visible β no opacity:0 trick since it's structural */ | |
| } | |
| .msg-version-nav button { | |
| display: flex; align-items: center; justify-content: center; | |
| width: 22px; height: 22px; border-radius: 50%; | |
| color: var(--text-muted); | |
| font-size: 16px; line-height: 1; | |
| transition: color var(--transition), background var(--transition); | |
| } | |
| .msg-version-nav button:hover:not(:disabled) { color: var(--text); background: var(--bg-hover); } | |
| .msg-version-nav button:disabled { opacity: 0.3; cursor: default; } | |
| /* ββ Message action buttons ββββββββββββββββββββββββββββββββββββββββββββββββ */ | |
| /* | |
| * Action buttons live BELOW their bubble in the flex column. | |
| * They fade in on group hover. | |
| */ | |
| .msg-actions { | |
| display: flex; | |
| gap: 2px; | |
| opacity: 0; | |
| transition: opacity var(--transition); | |
| pointer-events: none; | |
| margin-top: 4px; | |
| } | |
| /* User actions: right-aligned */ | |
| .msg-actions-right { | |
| align-self: flex-end; | |
| flex-direction: row-reverse; | |
| } | |
| /* Assistant actions: left-aligned with a tiny top gap */ | |
| .msg-actions-left { | |
| align-self: flex-start; | |
| padding-top: 1px; | |
| } | |
| .msg-group:hover .msg-actions, | |
| .msg-group:focus-within .msg-actions { | |
| opacity: 1; | |
| pointer-events: auto; | |
| } | |
| .msg-action-btn { | |
| display: flex; align-items: center; justify-content: center; | |
| width: 26px; height: 26px; | |
| border-radius: var(--radius-sm); | |
| color: var(--text-muted); | |
| transition: color var(--transition), background var(--transition); | |
| } | |
| .msg-action-btn:hover { color: var(--text); background: var(--bg-hover); } | |
| /* Edit toolbar (assistant bubble) */ | |
| .edit-actions { | |
| position: absolute; | |
| bottom: 10px; | |
| right: 12px; | |
| display: flex; | |
| gap: 6px; | |
| } | |
| /* ββ Edit toolbar for user messages βββββββββββββββββββββββββββββββββββββββ */ | |
| .edit-toolbar { | |
| display: flex; | |
| align-items: center; | |
| justify-content: space-between; | |
| flex-wrap: wrap; | |
| gap: 6px; | |
| margin-top: 8px; | |
| padding-top: 8px; | |
| border-top: 1px solid var(--border); | |
| } | |
| .edit-tool-row { | |
| display: flex; | |
| align-items: center; | |
| gap: 3px; | |
| flex-wrap: wrap; | |
| flex: 1; | |
| } | |
| .edit-tool-btn { | |
| /* Inherits .tool-btn-sm styles */ | |
| } | |
| .edit-attach-btn { | |
| display: flex; align-items: center; justify-content: center; | |
| width: 26px; height: 26px; | |
| border-radius: var(--radius-sm); | |
| color: var(--text-muted); | |
| border: 1px solid var(--border-bright); | |
| transition: color var(--transition), background var(--transition); | |
| flex-shrink: 0; | |
| } | |
| .edit-attach-btn:hover { color: var(--text); background: var(--bg-hover); } | |
| .edit-btn-row { | |
| display: flex; | |
| align-items: center; | |
| gap: 6px; | |
| flex-shrink: 0; | |
| } | |
| .edit-send-btn { | |
| display: inline-flex; align-items: center; gap: 5px; | |
| font-size: 12px ; | |
| padding: 5px 12px ; | |
| } | |
| .edit-file-preview-row { | |
| display: none; | |
| flex-wrap: wrap; | |
| gap: 6px; | |
| padding: 4px 0 0; | |
| } | |
| /* ββ Thinking animation ββββββββββββββββββββββββββββββββββββββββββββββββββββ */ | |
| .msg-thinking { | |
| display: flex; gap: 4px; align-items: center; | |
| padding: 10px 0; | |
| } | |
| .thinking-dot { | |
| width: 6px; height: 6px; border-radius: 50%; | |
| background: var(--text-muted); | |
| animation: thinkBounce 1.4s infinite ease-in-out; | |
| } | |
| .thinking-dot:nth-child(2) { animation-delay: 0.2s; } | |
| .thinking-dot:nth-child(3) { animation-delay: 0.4s; } | |
| @keyframes thinkBounce { | |
| 0%, 80%, 100% { transform: translateY(0); opacity: 0.4; } | |
| 40% { transform: translateY(-6px); opacity: 1; } | |
| } | |
| /* ββ Code blocks βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ */ | |
| .code-block { | |
| margin: 10px 0; | |
| border-radius: var(--radius-md); | |
| overflow: hidden; | |
| border: 1px solid var(--border); | |
| background: #0d0e11; | |
| } | |
| [data-theme="light"] .code-block { background: #1a1b20; } | |
| .code-header { | |
| display: flex; align-items: center; justify-content: space-between; | |
| padding: 6px 14px; | |
| background: rgba(255,255,255,0.04); | |
| border-bottom: 1px solid var(--border); | |
| } | |
| .code-lang { | |
| font-size: 12px; font-family: var(--font-mono); | |
| color: var(--text-muted); | |
| } | |
| .code-copy-btn { | |
| font-size: 11px; color: var(--text-muted); | |
| padding: 2px 8px; border-radius: 4px; | |
| cursor: pointer; | |
| transition: color var(--transition), background var(--transition); | |
| } | |
| .code-copy-btn:hover { color: var(--text); background: var(--bg-hover); } | |
| .code-block pre { | |
| padding: 14px 16px; | |
| overflow-x: auto; | |
| font-size: 13px; | |
| font-family: var(--font-mono); | |
| line-height: 1.6; | |
| color: #e2e8f0; | |
| } | |
| .code-block pre code, | |
| .code-block code { | |
| background: none ; | |
| padding: 0 ; | |
| border-radius: 0 ; | |
| font-size: inherit ; | |
| color: inherit ; | |
| } | |
| /* Inline code */ | |
| .msg-assistant .inline-code, | |
| .msg-user .inline-code, | |
| .msg-assistant > p > code, | |
| .msg-user > p > code { | |
| font-family: var(--font-mono); | |
| font-size: 0.88em; | |
| background: var(--bg-active); | |
| padding: 1px 5px; | |
| border-radius: 4px; | |
| } | |
| /* Tables */ | |
| .msg-assistant table { | |
| border-collapse: collapse; | |
| width: 100%; | |
| margin: 10px 0; | |
| font-size: 14px; | |
| } | |
| .msg-assistant th, .msg-assistant td { | |
| border: 1px solid var(--border-bright); | |
| padding: 7px 12px; | |
| text-align: left; | |
| } | |
| .msg-assistant th { background: var(--bg-raised); font-weight: 600; } | |
| .msg-assistant tr:nth-child(even) { background: rgba(255,255,255,0.02); } | |
| /* Images/video/audio in chat */ | |
| .msg-media { | |
| max-width: 420px; | |
| border-radius: var(--radius-md); | |
| overflow: hidden; | |
| margin: 8px 0; | |
| position: relative; | |
| } | |
| .msg-media img { | |
| display: block; width: 100%; | |
| border-radius: var(--radius-md); | |
| cursor: pointer; | |
| transition: opacity var(--transition); | |
| } | |
| .msg-media img:hover { opacity: 0.9; } | |
| .msg-media video, .msg-media audio { | |
| width: 100%; | |
| border-radius: var(--radius-md); | |
| } | |
| .media-download-btn { | |
| position: absolute; top: 8px; right: 8px; | |
| padding: 4px 10px; border-radius: var(--radius-full); | |
| background: rgba(0,0,0,0.6); color: white; font-size: 11px; | |
| opacity: 0; transition: opacity var(--transition); | |
| } | |
| .msg-media:hover .media-download-btn { opacity: 1; } | |
| /* Tool call bubble */ | |
| .msg-tool-call { | |
| display: inline-flex; align-items: center; gap: 6px; | |
| padding: 4px 10px; border-radius: var(--radius-full); | |
| background: var(--bg-raised); border: 1px solid var(--border); | |
| font-size: 12px; color: var(--text-dim); | |
| cursor: pointer; margin: 4px 0; | |
| transition: border-color var(--transition), color var(--transition); | |
| } | |
| .msg-tool-call:hover { border-color: var(--blue-bright); color: var(--text); } | |
| .msg-tool-call svg { color: var(--yellow); } | |
| /* Span colors from AI */ | |
| span[data-color="green"] { color: #4ade80; } | |
| span[data-color="blue"] { color: #60a5fa; } | |
| span[data-color="red"] { color: #f87171; } | |
| span[data-color="orange"] { color: #fb923c; } | |
| span[data-color="yellow"] { color: #facc15; } | |
| span[data-color="purple"] { color: #c084fc; } | |
| span[data-color="teal"] { color: #2dd4bf; } | |
| span[data-color="gold"] { color: #e5c846; } | |
| span[data-color="coral"] { color: #f97316; } | |
| span[data-color="pink"] { color: #f472b6; } | |
| /* Pasted content chip */ | |
| .pasted-chip { | |
| display: inline-flex; align-items: center; gap: 6px; | |
| padding: 4px 10px; border-radius: var(--radius-full); | |
| background: var(--bg-raised); border: 1px solid var(--border-bright); | |
| font-size: 12px; color: var(--text-dim); cursor: pointer; | |
| margin: 4px 0; | |
| } | |
| .pasted-chip .chip-remove { | |
| width: 14px; height: 14px; border-radius: 50%; | |
| display: flex; align-items: center; justify-content: center; | |
| font-size: 10px; color: var(--text-muted); | |
| transition: background var(--transition); | |
| } | |
| .pasted-chip .chip-remove:hover { background: var(--bg-hover); color: var(--text); } | |
| /* Attached image thumb */ | |
| .attach-thumb { | |
| display: inline-block; | |
| width: 48px; height: 48px; | |
| border-radius: var(--radius-sm); overflow: hidden; | |
| position: relative; cursor: pointer; | |
| } | |
| .attach-thumb img { width: 100%; height: 100%; object-fit: cover; } | |
| .attach-thumb .thumb-remove { | |
| position: absolute; top: -4px; right: -4px; | |
| width: 16px; height: 16px; border-radius: 50%; | |
| background: var(--bg); border: 1px solid var(--border-bright); | |
| display: flex; align-items: center; justify-content: center; | |
| font-size: 9px; color: var(--text); | |
| } | |
| /* SVG side panel */ | |
| #svg-panel { | |
| position: fixed; right: 0; top: 0; bottom: 0; | |
| width: 320px; background: var(--bg-surface); | |
| border-left: 1px solid var(--border-bright); | |
| z-index: 200; display: flex; flex-direction: column; | |
| animation: slideInRight 0.2s ease; | |
| } | |
| #svg-panel-header { | |
| display: flex; align-items: center; justify-content: space-between; | |
| padding: 12px 16px; border-bottom: 1px solid var(--border); | |
| } | |
| #svg-panel-content { flex: 1; overflow: auto; padding: 16px; } | |
| #svg-panel img { max-width: 100%; border-radius: var(--radius-sm); } | |
| /* Generating animation */ | |
| .msg-generating { | |
| animation: generatingGlow 2s ease infinite; | |
| } | |
| @keyframes generatingGlow { | |
| 0%, 100% { opacity: 1; } | |
| 50% { opacity: 0.75; } | |
| } | |
| /* ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| MOBILE CHAT | |
| ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ */ | |
| @media (max-width: 768px) { | |
| /* Main: full height, strict no-overflow */ | |
| #main { | |
| height: 100dvh; | |
| max-height: 100dvh; | |
| overflow: hidden; | |
| display: flex; | |
| flex-direction: column; | |
| } | |
| /* Chat view: the only vertical scrollbar */ | |
| .chat-view { | |
| flex: 1; | |
| min-height: 0; | |
| overflow-y: auto; | |
| overflow-x: hidden; | |
| -webkit-overflow-scrolling: touch; | |
| overscroll-behavior-y: contain; | |
| /* Account for fixed top bar */ | |
| padding-top: 4px; | |
| } | |
| /* Welcome view: centered, no scroll */ | |
| .welcome-view { | |
| flex: 1; | |
| min-height: 0; | |
| overflow: hidden; | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| justify-content: center; | |
| padding-top: 0 ; | |
| padding-bottom: 40px ; | |
| gap: 20px ; | |
| } | |
| .welcome-title { | |
| text-align: center; | |
| font-size: clamp(22px, 6vw, 36px) ; | |
| } | |
| /* Messages: no extra horizontal overflow */ | |
| .chat-messages { | |
| padding: 0 12px; | |
| max-width: 100%; | |
| /* Ensure nothing bleeds sideways */ | |
| overflow-x: hidden; | |
| } | |
| /* Bubbles */ | |
| .msg-user { | |
| max-width: 88%; | |
| font-size: 14px; | |
| padding: 9px 14px; | |
| } | |
| .msg-user.editing-user { | |
| max-width: 98%; | |
| width: 98%; | |
| } | |
| .msg-assistant { | |
| max-width: 100%; | |
| font-size: 14px; | |
| } | |
| /* Code blocks: horizontal scroll only */ | |
| .code-block { | |
| overflow: hidden; | |
| } | |
| .code-block pre { | |
| overflow-x: auto; | |
| overflow-y: hidden; | |
| -webkit-overflow-scrolling: touch; | |
| font-size: 12px; | |
| } | |
| /* Tables: horizontal scroll only */ | |
| .msg-assistant table { | |
| display: block; | |
| overflow-x: auto; | |
| -webkit-overflow-scrolling: touch; | |
| max-width: 100%; | |
| } | |
| /* Edit toolbar on mobile: stack tool row and button row */ | |
| .edit-toolbar { | |
| flex-direction: column; | |
| align-items: stretch; | |
| } | |
| .edit-tool-row { | |
| flex-wrap: wrap; | |
| } | |
| /* On mobile, hide tool label text in edit toolbar */ | |
| .edit-tool-btn span { | |
| display: none; | |
| } | |
| .edit-tool-btn { | |
| padding: 3px 6px; | |
| min-width: 28px; | |
| justify-content: center; | |
| } | |
| .edit-btn-row { | |
| justify-content: flex-end; | |
| } | |
| /* Action buttons: always show on mobile (no hover) */ | |
| .msg-actions { | |
| opacity: 1; | |
| pointer-events: auto; | |
| } | |
| /* Version nav: always visible, compact */ | |
| .msg-version-nav { | |
| font-size: 11px; | |
| } | |
| } |