Skip to content

Commit 521925c

Browse files
authored
Update styles.module.cssto fix terminal input on mobile
1 parent ca434f7 commit 521925c

1 file changed

Lines changed: 24 additions & 10 deletions

File tree

src/components/InteractivePython/styles.module.css

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@
131131
gap: 8px;
132132
border-top: 1px solid rgba(0, 0, 0, 0.06);
133133
background-color: rgba(0, 0, 0, 0.02);
134+
width: 100%;
134135
}
135136

136137
[data-theme="dark"] .inputForm {
@@ -144,24 +145,32 @@
144145
color: var(--ifm-color-primary);
145146
font-weight: 600;
146147
flex-shrink: 0;
148+
white-space: nowrap;
147149
}
148150

149151
.terminalInput {
150152
flex: 1;
151-
min-width: 0; /* Prevents input from overflowing flex container on mobile */
152-
background: transparent;
153-
border: none;
153+
min-width: 80px; /* Prevents flexbox from collapsing input to 0px width */
154+
background: rgba(0, 0, 0, 0.04);
155+
border: 1px solid rgba(0, 0, 0, 0.12);
154156
outline: none;
155-
color: #f8fafc;
157+
color: #0f172a;
156158
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
157159
font-size: 0.9rem;
158160
caret-color: var(--ifm-color-primary);
159-
padding: 4px 6px;
161+
padding: 6px 8px;
160162
border-radius: 4px;
163+
transition: border-color 0.15s ease;
161164
}
162165

163-
[data-theme="light"] .terminalInput {
164-
color: #0f172a;
166+
[data-theme="dark"] .terminalInput {
167+
background: rgba(255, 255, 255, 0.05);
168+
border-color: rgba(255, 255, 255, 0.12);
169+
color: #f8fafc;
170+
}
171+
172+
.terminalInput:focus {
173+
border-color: var(--ifm-color-primary);
165174
}
166175

167176
/* Accessible and clean action button */
@@ -173,7 +182,7 @@
173182
font-weight: 600;
174183
font-size: 0.8rem;
175184
letter-spacing: 0.02rem;
176-
padding: 6px 14px;
185+
padding: 6px 12px;
177186
cursor: pointer;
178187
border-radius: 4px;
179188
transition: background-color 0.15s ease;
@@ -200,8 +209,13 @@
200209
}
201210

202211
.inputForm {
203-
padding: 0.6rem 0.8rem;
204-
flex-wrap: wrap; /* Allows wrap on tight screens to keep button visible */
212+
padding: 0.5rem 0.75rem;
213+
gap: 6px; /* Tightens gaps so prompt, input, and button fit cleanly on one line */
214+
}
215+
216+
.submitInputBtn {
217+
padding: 6px 10px;
218+
font-size: 0.75rem;
205219
}
206220
}
207221

0 commit comments

Comments
 (0)