devportal2 / static /css /terminal.css
Akay Borana
Fix input: remove CSS hacks that broke xterm.js native mobile input
dc2321b
Raw
History Blame Contribute Delete
3.21 kB
/* static/css/terminal.css - xterm.js PTY terminal */
.term-layout {
flex: 1;
display: flex;
flex-direction: column;
overflow: hidden;
}
.term-shell {
flex: 1;
display: flex;
flex-direction: column;
overflow: hidden;
min-height: 0;
}
.term-header {
height: 40px;
background: var(--bg-elevated);
border-bottom: 1px solid var(--border);
display: flex;
align-items: center;
padding: 0 var(--sp-3);
gap: var(--sp-2);
flex-shrink: 0;
}
.term-tab {
padding: 4px 12px;
font-size: 12px;
font-weight: 500;
color: var(--text-2);
display: flex;
align-items: center;
}
.term-tab.active {
color: var(--accent);
}
.term-actions {
margin-left: auto;
display: flex;
gap: var(--sp-1);
}
/* xterm.js container */
.xterm-container {
flex: 1;
overflow: hidden;
background: #0a0a0a;
min-height: 0;
touch-action: manipulation;
cursor: text;
}
.xterm-container .xterm {
height: 100%;
padding: 4px 8px;
}
.xterm-container .xterm-viewport {
overflow-y: auto !important;
}
/* Extra keys row */
.term-keys {
display: flex;
background: var(--bg-elevated);
border-top: 1px solid var(--border);
padding: var(--sp-2);
gap: var(--sp-2);
overflow-x: auto;
flex-shrink: 0;
-webkit-overflow-scrolling: touch;
scrollbar-width: none;
}
.term-keys::-webkit-scrollbar { display: none; }
.term-key {
background: rgba(255,255,255,0.04);
border: 1px solid var(--border);
color: var(--text-1);
padding: 0 var(--sp-3);
border-radius: var(--r-sm);
font-size: 12px;
font-family: var(--font-mono);
font-weight: 500;
cursor: pointer;
min-height: 40px;
min-width: 48px;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
touch-action: manipulation;
transition: all 0.1s ease;
}
.term-key:active {
background: var(--accent);
color: var(--accent-text);
transform: scale(0.95);
}
.term-key.ctrl-active {
background: var(--accent);
color: var(--accent-text);
}
/* Desktop: side panel */
.term-side {
display: none;
}
@media (min-width: 769px) {
.term-layout {
flex-direction: row;
padding: var(--sp-4);
gap: var(--sp-4);
}
.term-shell {
border: 1px solid var(--border);
border-radius: var(--r-md);
overflow: hidden;
}
.term-side {
display: flex;
flex-direction: column;
width: 320px;
flex-shrink: 0;
gap: var(--sp-4);
}
.glass-panel {
flex: 1;
background: var(--bg-elevated);
border: 1px solid var(--border);
border-radius: var(--r-md);
padding: var(--sp-4);
display: flex;
flex-direction: column;
}
.panel-title {
font-size: 12px;
font-weight: 600;
color: var(--text-3);
text-transform: uppercase;
letter-spacing: 0.5px;
margin-bottom: var(--sp-3);
display: flex;
align-items: center;
gap: var(--sp-2);
}
}
/* Light theme */
:root.light .xterm-container {
background: #ffffff;
}