timeki commited on
Commit
27a9af5
1 Parent(s): 12f47f8

update css

Browse files
Files changed (2) hide show
  1. app.py +1 -0
  2. style.css +36 -16
app.py CHANGED
@@ -366,6 +366,7 @@ with gr.Blocks(title="Climate Q&A", css_paths=os.getcwd()+ "/style.css", theme=t
366
  layout = "panel",
367
  avatar_images = (None,"https://i.ibb.co/YNyd5W2/logo4.png"),
368
  max_height="80vh",
 
369
  )
370
 
371
  # bot.like(vote,None,None)
 
366
  layout = "panel",
367
  avatar_images = (None,"https://i.ibb.co/YNyd5W2/logo4.png"),
368
  max_height="80vh",
369
+ height="100vh"
370
  )
371
 
372
  # bot.like(vote,None,None)
style.css CHANGED
@@ -3,9 +3,9 @@
3
  --user-image: url('https://ih1.redbubble.net/image.4776899543.6215/st,small,507x507-pad,600x600,f8f8f8.jpg');
4
  } */
5
 
 
6
  /* fix for huggingface infinite growth*/
7
  main.flex.flex-1.flex-col {
8
- max-height: 95vh;
9
  max-height: 95vh !important;
10
  }
11
 
@@ -202,51 +202,59 @@ label.selected{
202
  padding:0px !important;
203
  }
204
 
205
-
206
  @media screen and (min-width: 1024px) {
 
 
 
 
 
 
 
 
 
 
 
207
  div#tab-examples{
208
  height:calc(100vh - 190px) !important;
209
- overflow-y: auto;
210
  }
211
 
212
  div#sources-textbox{
213
  height:calc(100vh - 190px) !important;
214
- overflow-y: auto !important;
215
  }
216
 
217
  div#sources-figures{
218
  height:calc(100vh - 190px) !important;
219
- overflow-y: auto !important;
220
  }
221
 
222
  div#tab-config{
223
  height:calc(100vh - 190px) !important;
224
- overflow-y: auto !important;
 
 
 
 
 
 
225
  }
226
 
 
227
  div#chatbot-row{
228
  height:calc(100vh - 90px) !important;
229
  max-height:calc(100vh - 90px) !important;
230
-
231
  }
232
 
233
- div#chatbot{
234
- height:calc(100vh - 170px) !important;
235
- max-height:calc(100vh - 90px) !important;
236
 
237
- }
238
 
239
  .max-height{
240
  height:calc(100vh - 90px) !important;
241
  max-height:calc(100vh - 90px) !important;
242
  overflow-y: auto;
243
  }
 
244
 
245
- /* .tabitem:nth-child(n+3) {
246
- padding-top:30px;
247
- padding-left:40px;
248
- padding-right:40px;
249
- } */
250
  }
251
 
252
  footer {
@@ -499,3 +507,15 @@ span.chatbot > p > img{
499
  .message-buttons-left.panel.message-buttons.with-avatar {
500
  display: none;
501
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  --user-image: url('https://ih1.redbubble.net/image.4776899543.6215/st,small,507x507-pad,600x600,f8f8f8.jpg');
4
  } */
5
 
6
+
7
  /* fix for huggingface infinite growth*/
8
  main.flex.flex-1.flex-col {
 
9
  max-height: 95vh !important;
10
  }
11
 
 
202
  padding:0px !important;
203
  }
204
 
 
205
  @media screen and (min-width: 1024px) {
206
+ .gradio-container {
207
+ max-height: calc(100vh - 190px) !important;
208
+ overflow: hidden;
209
+ }
210
+
211
+ /* div#chatbot{
212
+ height:calc(100vh - 170px) !important;
213
+ max-height:calc(100vh - 170px) !important;
214
+
215
+ } */
216
+
217
  div#tab-examples{
218
  height:calc(100vh - 190px) !important;
219
+ /* overflow-y: auto; */
220
  }
221
 
222
  div#sources-textbox{
223
  height:calc(100vh - 190px) !important;
224
+ /* overflow-y: auto !important; */
225
  }
226
 
227
  div#sources-figures{
228
  height:calc(100vh - 190px) !important;
229
+ /* overflow-y: auto !important; */
230
  }
231
 
232
  div#tab-config{
233
  height:calc(100vh - 190px) !important;
234
+ /* overflow-y: auto !important; */
235
+ }
236
+
237
+ /* Force container to respect height limits */
238
+ .main-component{
239
+ contain: size layout;
240
+ overflow: hidden;
241
  }
242
 
243
+ /*
244
  div#chatbot-row{
245
  height:calc(100vh - 90px) !important;
246
  max-height:calc(100vh - 90px) !important;
 
247
  }
248
 
 
 
 
249
 
 
250
 
251
  .max-height{
252
  height:calc(100vh - 90px) !important;
253
  max-height:calc(100vh - 90px) !important;
254
  overflow-y: auto;
255
  }
256
+ */
257
 
 
 
 
 
 
258
  }
259
 
260
  footer {
 
507
  .message-buttons-left.panel.message-buttons.with-avatar {
508
  display: none;
509
  }
510
+
511
+ /* Specific fixes for Hugging Face Space iframe */
512
+ .h-full {
513
+ height: auto !important;
514
+ min-height: 0 !important;
515
+ }
516
+
517
+ .space-content {
518
+ height: auto !important;
519
+ max-height: 100vh !important;
520
+ overflow: hidden;
521
+ }