FrederickSundeep commited on
Commit
fef2bfb
·
1 Parent(s): ed21b24

commit initial 09-12-2025 41

Browse files
Files changed (1) hide show
  1. src/App.css +142 -89
src/App.css CHANGED
@@ -2,13 +2,21 @@
2
  Global & Base
3
  ============================ */
4
 
5
- * {
6
- box-sizing: border-box;
 
7
  margin: 0;
8
  padding: 0;
 
 
 
 
 
 
 
 
9
  }
10
 
11
- /* Optional: CRA root */
12
  .App {
13
  text-align: center;
14
  }
@@ -21,6 +29,7 @@
21
  flex-direction: column;
22
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
23
  overflow: hidden;
 
24
  }
25
 
26
  /* Themes */
@@ -48,6 +57,7 @@
48
  color: #eee;
49
  font-size: 13px;
50
  border-bottom: 1px solid #444;
 
51
  }
52
 
53
  .ide-menubar-left,
@@ -84,7 +94,9 @@
84
  .ide-body {
85
  flex: 1;
86
  display: flex;
87
- overflow: hidden;
 
 
88
  }
89
 
90
  /* ============================
@@ -92,6 +104,8 @@
92
  ============================ */
93
 
94
  .ide-sidebar {
 
 
95
  width: 210px;
96
  background: #252526;
97
  color: #ccc;
@@ -106,6 +120,9 @@
106
  cursor: pointer;
107
  user-select: none;
108
  border-radius: 3px;
 
 
 
109
  }
110
 
111
  .tree-item:hover {
@@ -117,17 +134,20 @@
117
  ============================ */
118
 
119
  .ide-main {
120
- flex: 1;
121
  display: flex;
122
  flex-direction: column;
123
  position: relative;
124
- min-width: 0;
 
125
  }
126
 
127
  /* Monaco wrapper */
128
  .ide-editor-wrapper {
129
- flex: 1;
130
  min-height: 0;
 
 
131
  }
132
 
133
  /* Bottom panels (output, stdin, problems) */
@@ -137,7 +157,10 @@
137
  padding: 6px;
138
  font-size: 13px;
139
  height: 28%;
140
- overflow-y: auto;
 
 
 
141
  }
142
 
143
  .ide-output {
@@ -150,28 +173,61 @@
150
  border-radius: 4px;
151
  font-family: "Consolas", monospace;
152
  font-size: 12px;
 
 
 
153
  }
154
 
155
  .ide-input-box {
156
  width: 100%;
157
  margin-top: 4px;
158
- padding: 4px;
159
  background: #111;
160
  border: 1px solid #444;
161
  color: #eee;
162
  border-radius: 3px;
163
  font-size: 12px;
 
164
  }
165
 
166
  /* Problems panel */
167
  .ide-problems-panel {
168
  margin-top: 6px;
169
- padding: 4px;
170
  background: #3c0000;
171
  color: #fff;
172
  border-left: 3px solid red;
173
  font-size: 12px;
174
  border-radius: 3px;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
175
  }
176
 
177
  /* ============================
@@ -179,6 +235,8 @@
179
  ============================ */
180
 
181
  .ide-right-panel {
 
 
182
  width: 280px;
183
  border-left: 1px solid #444;
184
  background: #252526;
@@ -187,6 +245,7 @@
187
  flex-direction: column;
188
  gap: 8px;
189
  font-size: 13px;
 
190
  }
191
 
192
  .ide-ai-header {
@@ -220,6 +279,7 @@
220
  color: #eee;
221
  font-family: Consolas, monospace;
222
  font-size: 12px;
 
223
  }
224
 
225
  /* AI buttons */
@@ -230,7 +290,7 @@
230
 
231
  .ide-ai-buttons button {
232
  flex: 1;
233
- padding: 4px 6px;
234
  font-size: 12px;
235
  border-radius: 4px;
236
  border: 1px solid #555;
@@ -271,7 +331,9 @@
271
  padding: 4px;
272
  animation: fadeIn 0.25s ease-in-out;
273
  font-size: 12px;
274
- z-index: 20;
 
 
275
  }
276
 
277
  .ai-suggest {
@@ -295,7 +357,9 @@
295
  padding: 10px;
296
  border: 1px solid #444;
297
  border-radius: 5px;
298
- z-index: 30;
 
 
299
  }
300
 
301
  .search-dialog input {
@@ -318,7 +382,9 @@
318
  border: 1px solid #555;
319
  border-radius: 5px;
320
  padding: 4px;
321
- z-index: 40;
 
 
322
  }
323
 
324
  .ide-context-menu div {
@@ -332,83 +398,9 @@
332
  }
333
 
334
  /* ============================
335
- Animations
336
  ============================ */
337
 
338
- @keyframes fadeIn {
339
- from {
340
- opacity: 0;
341
- transform: translateY(5px);
342
- }
343
- to {
344
- opacity: 1;
345
- transform: translateY(0);
346
- }
347
- }
348
-
349
- /* ============================
350
- 📱 Mobile / Tablet Responsive
351
- ============================ */
352
-
353
- @media (max-width: 768px) {
354
- /* Stack everything vertically */
355
- .ide-body {
356
- flex-direction: column;
357
- }
358
-
359
- /* Sidebar: full width at top */
360
- .ide-sidebar {
361
- width: 100%;
362
- max-height: 24vh;
363
- border-right: none;
364
- border-bottom: 1px solid #444;
365
- }
366
-
367
- /* Main editor: comes after sidebar */
368
- .ide-main {
369
- order: 2;
370
- }
371
-
372
- .ide-editor-wrapper {
373
- height: 40vh;
374
- }
375
-
376
- /* Output panel: keep compact */
377
- .ide-panels {
378
- height: auto;
379
- max-height: 26vh;
380
- }
381
-
382
- /* Right AI panel: full width at bottom */
383
- .ide-right-panel {
384
- width: 100%;
385
- order: 3;
386
- border-left: none;
387
- border-top: 1px solid #444;
388
- }
389
-
390
- /* Search dialog: more width */
391
- .search-dialog {
392
- right: 8px;
393
- left: 8px;
394
- width: auto;
395
- }
396
-
397
- /* Context menu: keep inside viewport */
398
- .ide-context-menu {
399
- max-width: 70vw;
400
- }
401
-
402
- /* AI popup: center-ish on mobile */
403
- .ai-popup {
404
- right: 8px;
405
- left: 8px;
406
- width: auto;
407
- }
408
- }
409
-
410
-
411
- /* ---------- progress bar under menubar ---------- */
412
  .ide-progress-wrap {
413
  height: 3px;
414
  background: transparent;
@@ -449,3 +441,64 @@
449
  @keyframes spin {
450
  to { transform: rotate(360deg); }
451
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  Global & Base
3
  ============================ */
4
 
5
+ html, body, #root {
6
+ height: 100%;
7
+ width: 100%;
8
  margin: 0;
9
  padding: 0;
10
+ overflow-x: hidden; /* prevent page-level horizontal scroll */
11
+ box-sizing: border-box;
12
+ }
13
+
14
+ *,
15
+ *::before,
16
+ *::after {
17
+ box-sizing: inherit;
18
  }
19
 
 
20
  .App {
21
  text-align: center;
22
  }
 
29
  flex-direction: column;
30
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
31
  overflow: hidden;
32
+ max-width: 100%;
33
  }
34
 
35
  /* Themes */
 
57
  color: #eee;
58
  font-size: 13px;
59
  border-bottom: 1px solid #444;
60
+ flex: 0 0 auto;
61
  }
62
 
63
  .ide-menubar-left,
 
94
  .ide-body {
95
  flex: 1;
96
  display: flex;
97
+ overflow: hidden; /* prevent children from creating page overflow */
98
+ min-height: 0; /* allow children to shrink (important for flex) */
99
+ max-width: 100%;
100
  }
101
 
102
  /* ============================
 
104
  ============================ */
105
 
106
  .ide-sidebar {
107
+ flex: 0 0 210px; /* fixed sidebar width */
108
+ min-width: 0; /* critical for preventing overflow from child */
109
  width: 210px;
110
  background: #252526;
111
  color: #ccc;
 
120
  cursor: pointer;
121
  user-select: none;
122
  border-radius: 3px;
123
+ white-space: nowrap;
124
+ overflow: hidden;
125
+ text-overflow: ellipsis;
126
  }
127
 
128
  .tree-item:hover {
 
134
  ============================ */
135
 
136
  .ide-main {
137
+ flex: 1 1 auto;
138
  display: flex;
139
  flex-direction: column;
140
  position: relative;
141
+ min-width: 0; /* CRITICAL: allow editor to shrink inside flex */
142
+ overflow: hidden;
143
  }
144
 
145
  /* Monaco wrapper */
146
  .ide-editor-wrapper {
147
+ flex: 1 1 auto;
148
  min-height: 0;
149
+ min-width: 0; /* important for monaco inside flex */
150
+ overflow: hidden;
151
  }
152
 
153
  /* Bottom panels (output, stdin, problems) */
 
157
  padding: 6px;
158
  font-size: 13px;
159
  height: 28%;
160
+ overflow: auto;
161
+ min-height: 120px;
162
+ box-sizing: border-box;
163
+ max-width: 100%;
164
  }
165
 
166
  .ide-output {
 
173
  border-radius: 4px;
174
  font-family: "Consolas", monospace;
175
  font-size: 12px;
176
+ white-space: pre-wrap;
177
+ word-break: break-word;
178
+ max-width: 100%;
179
  }
180
 
181
  .ide-input-box {
182
  width: 100%;
183
  margin-top: 4px;
184
+ padding: 6px;
185
  background: #111;
186
  border: 1px solid #444;
187
  color: #eee;
188
  border-radius: 3px;
189
  font-size: 12px;
190
+ box-sizing: border-box;
191
  }
192
 
193
  /* Problems panel */
194
  .ide-problems-panel {
195
  margin-top: 6px;
196
+ padding: 8px;
197
  background: #3c0000;
198
  color: #fff;
199
  border-left: 3px solid red;
200
  font-size: 12px;
201
  border-radius: 3px;
202
+ overflow: auto;
203
+ white-space: pre-wrap;
204
+ word-break: break-word;
205
+ }
206
+
207
+ /* ============================
208
+ Terminal / XTerm container
209
+ ============================ */
210
+
211
+ /* Ensure terminal fits container and doesn't push layout */
212
+ #terminal-container {
213
+ width: 100% !important;
214
+ max-width: 100% !important;
215
+ box-sizing: border-box;
216
+ overflow-x: auto; /* keep horizontal scroll inside terminal only */
217
+ height: 180px;
218
+ background: #1e1e1e;
219
+ border-top: 1px solid #333;
220
+ border-radius: 4px;
221
+ }
222
+
223
+ /* Terminal content wrapper (if you have a wrapper class) */
224
+ .terminal-content {
225
+ width: 100%;
226
+ max-width: 100%;
227
+ overflow-x: auto;
228
+ white-space: pre-wrap;
229
+ word-break: break-word;
230
+ font-family: "Consolas", monospace;
231
  }
232
 
233
  /* ============================
 
235
  ============================ */
236
 
237
  .ide-right-panel {
238
+ flex: 0 0 280px;
239
+ min-width: 0;
240
  width: 280px;
241
  border-left: 1px solid #444;
242
  background: #252526;
 
245
  flex-direction: column;
246
  gap: 8px;
247
  font-size: 13px;
248
+ overflow: auto;
249
  }
250
 
251
  .ide-ai-header {
 
279
  color: #eee;
280
  font-family: Consolas, monospace;
281
  font-size: 12px;
282
+ box-sizing: border-box;
283
  }
284
 
285
  /* AI buttons */
 
290
 
291
  .ide-ai-buttons button {
292
  flex: 1;
293
+ padding: 6px;
294
  font-size: 12px;
295
  border-radius: 4px;
296
  border: 1px solid #555;
 
331
  padding: 4px;
332
  animation: fadeIn 0.25s ease-in-out;
333
  font-size: 12px;
334
+ z-index: 200; /* ensure it sits above other UI */
335
+ max-width: calc(100vw - 24px);
336
+ box-sizing: border-box;
337
  }
338
 
339
  .ai-suggest {
 
357
  padding: 10px;
358
  border: 1px solid #444;
359
  border-radius: 5px;
360
+ z-index: 300;
361
+ max-width: calc(100vw - 24px);
362
+ box-sizing: border-box;
363
  }
364
 
365
  .search-dialog input {
 
382
  border: 1px solid #555;
383
  border-radius: 5px;
384
  padding: 4px;
385
+ z-index: 400;
386
+ max-width: calc(100vw - 24px);
387
+ box-sizing: border-box;
388
  }
389
 
390
  .ide-context-menu div {
 
398
  }
399
 
400
  /* ============================
401
+ Progress / Spinner
402
  ============================ */
403
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
404
  .ide-progress-wrap {
405
  height: 3px;
406
  background: transparent;
 
441
  @keyframes spin {
442
  to { transform: rotate(360deg); }
443
  }
444
+
445
+ /* ============================
446
+ Misc: Text wrapping & safety
447
+ ============================ */
448
+
449
+ .ide-output, .ide-explain, .ide-problems-panel, .tree-item, .ai-popup, .ai-suggest {
450
+ overflow-wrap: break-word;
451
+ word-break: break-word;
452
+ white-space: pre-wrap;
453
+ }
454
+
455
+ /* Buttons, inputs, selects must not exceed container */
456
+ button, input, textarea, select {
457
+ max-width: 100%;
458
+ box-sizing: border-box;
459
+ }
460
+
461
+ /* Final safety: hide any stray horizontal overflow */
462
+ #root, .ide-root, .ide-body, .ide-main { overflow-x: hidden; }
463
+
464
+ /* ============================
465
+ 📱 Mobile / Tablet Responsive
466
+ ============================ */
467
+
468
+ @media (max-width: 900px) {
469
+ /* Stack layout vertically on small screens */
470
+ .ide-body { flex-direction: column; }
471
+
472
+ /* Sidebar becomes top strip */
473
+ .ide-sidebar {
474
+ width: 100%;
475
+ flex: 0 0 auto;
476
+ max-height: 22vh;
477
+ border-right: none;
478
+ border-bottom: 1px solid #444;
479
+ }
480
+
481
+ .ide-main { order: 2; min-height: 40vh; }
482
+ .ide-editor-wrapper { height: 40vh; }
483
+
484
+ /* Bottom panels adapt */
485
+ .ide-panels { height: auto; max-height: 26vh; }
486
+
487
+ /* Right panel becomes bottom full width */
488
+ .ide-right-panel {
489
+ width: 100%;
490
+ order: 3;
491
+ border-left: none;
492
+ border-top: 1px solid #444;
493
+ }
494
+
495
+ .ai-popup { right: 8px; left: 8px; width: auto; max-width: calc(100vw - 16px); }
496
+ .search-dialog { right: 8px; left: 8px; width: auto; }
497
+ .ide-context-menu { max-width: 70vw; }
498
+ }
499
+
500
+ /* Small-screen tweak for very small devices */
501
+ @media (max-width: 420px) {
502
+ .ide-menubar { font-size: 12px; padding: 0 6px; }
503
+ .ide-ai-buttons button, .ide-menubar button { padding: 4px; font-size: 12px; }
504
+ }