Files
PinchChat/src/index.css
Nicolas Varrot 73881396d1 fix: hide textarea scrollbar when content doesn't overflow
Set overflow-y: auto on textarea so the vertical scrollbar only
appears when content exceeds max-height. Fixes #43.
2026-02-12 23:11:25 +00:00

155 lines
3.4 KiB
CSS

@import "tailwindcss";
@import "highlight.js/styles/base16/material-palenight.min.css";
* {
scrollbar-width: thin;
scrollbar-color: #52525b #27272a;
}
/* WebKit scrollbar styling (Chrome, Safari, Edge) */
::-webkit-scrollbar {
width: 6px;
height: 6px;
}
::-webkit-scrollbar-track {
background: transparent;
}
::-webkit-scrollbar-thumb {
background: #52525b;
border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
background: #71717a;
}
/* Textarea-specific: even thinner scrollbar, no horizontal scroll */
textarea::-webkit-scrollbar {
width: 4px;
height: 0;
}
textarea::-webkit-scrollbar:horizontal {
display: none;
}
textarea::-webkit-scrollbar-thumb {
background: #3f3f46;
border-radius: 2px;
}
textarea::-webkit-scrollbar-thumb:hover {
background: #52525b;
}
textarea {
overflow-x: hidden;
overflow-y: auto;
overflow-wrap: break-word;
word-break: break-word;
}
html, body {
margin: 0;
background: #1e1e24;
color: #d4d4d8;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
overflow-x: hidden;
max-width: 100vw;
}
@keyframes fade-in {
from { opacity: 0; transform: translateY(8px); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse-dot {
0%, 100% { opacity: 1; }
50% { opacity: 0.4; }
}
@keyframes bounce-dot {
0%, 80%, 100% { transform: translateY(0); opacity: 0.45; }
40% { transform: translateY(-4px); opacity: 1; }
}
.animate-fade-in {
animation: fade-in 0.3s ease-out;
}
.pulse-dot {
animation: pulse-dot 2s ease-in-out infinite;
}
.bounce-dot {
animation: bounce-dot 0.9s infinite ease-in-out;
}
.bounce-dot:nth-child(1) { animation-delay: 0s; }
.bounce-dot:nth-child(2) { animation-delay: 0.12s; }
.bounce-dot:nth-child(3) { animation-delay: 0.24s; }
/* Markdown styles */
.markdown-body pre {
background: #1a1a20 !important;
border: 1px solid rgba(255,255,255,0.06);
border-radius: 12px;
padding: 16px;
overflow-x: auto;
margin: 8px 0;
font-size: 0.82em;
line-height: 1.6;
max-width: 100%;
box-sizing: border-box;
}
.markdown-body pre code {
white-space: pre;
word-break: normal;
overflow-wrap: normal;
}
.markdown-body code {
background: rgba(255,255,255,0.07);
padding: 2px 6px;
border-radius: 6px;
font-size: 0.85em;
}
/* Override highlight.js theme bg to match */
.hljs {
background: #1a1a20 !important;
}
.markdown-body p { margin: 4px 0; }
.markdown-body ul, .markdown-body ol { margin: 4px 0; padding-left: 20px; }
.markdown-body blockquote { border-left: 3px solid rgba(34,211,238,0.4); padding-left: 12px; margin: 8px 0; opacity: 0.8; }
.markdown-body h1, .markdown-body h2, .markdown-body h3 { margin: 12px 0 4px; }
.markdown-body a { color: #67e8f9; text-decoration: underline; }
.markdown-body table { border-collapse: collapse; margin: 8px 0; display: block; overflow-x: auto; max-width: 100%; }
.markdown-body th, .markdown-body td { border: 1px solid rgba(255,255,255,0.08); padding: 6px 12px; }
.markdown-body th { background: rgba(255,255,255,0.04); }
.markdown-body img { max-width: 100%; border-radius: 8px; }
/* Accessibility: respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
.animate-fade-in {
animation: none;
}
.pulse-dot {
animation: none;
}
.bounce-dot {
animation: none;
opacity: 0.7;
}
*,
*::before,
*::after {
transition-duration: 0.01ms !important;
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
}
}