topguy commited on
Commit
cef8efc
·
1 Parent(s): 42bdcb2

fix: added some padding to textedit field so they look better in firefox.

Browse files
Files changed (2) hide show
  1. app.py +2 -2
  2. modules/ui_layout.py +25 -0
app.py CHANGED
@@ -1,6 +1,6 @@
1
  import gradio as gr
2
- from modules.ui_layout import build_ui
3
 
4
  if __name__ == "__main__":
5
  demo = build_ui()
6
- demo.launch(theme=gr.themes.Soft(),share=False)
 
1
  import gradio as gr
2
+ from modules.ui_layout import build_ui, UI_CSS
3
 
4
  if __name__ == "__main__":
5
  demo = build_ui()
6
+ demo.launch(theme=gr.themes.Soft(), css=UI_CSS, share=False)
modules/ui_layout.py CHANGED
@@ -9,6 +9,31 @@ from .integrations import (
9
  )
10
  from .name_generator import generate_fantasy_name
11
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  def build_ui():
13
  with gr.Blocks(title="Chronicle Portrait Studio") as demo:
14
  with gr.Row(variant="compact"):
 
9
  )
10
  from .name_generator import generate_fantasy_name
11
 
12
+ UI_CSS = """
13
+ .container span {
14
+ line-height: 1.6 !important;
15
+ margin-bottom: 8px !important;
16
+ display: inline-block !important;
17
+ }
18
+ .container textarea {
19
+ min-height: 42px !important;
20
+ line-height: 1.5 !important;
21
+ overflow-y: visible !important;
22
+ padding-top: 8px !important;
23
+ padding-bottom: 8px !important;
24
+ }
25
+ /* Firefox specific fixes */
26
+ @-moz-document url-prefix() {
27
+ .container textarea {
28
+ padding-top: 10px !important;
29
+ padding-bottom: 10px !important;
30
+ }
31
+ .container span {
32
+ padding-bottom: 2px !important;
33
+ }
34
+ }
35
+ """
36
+
37
  def build_ui():
38
  with gr.Blocks(title="Chronicle Portrait Studio") as demo:
39
  with gr.Row(variant="compact"):