Spaces:
Running on Zero

Shenhan commited on
Commit
2eec021
·
verified ·
1 Parent(s): a863b67

Fix example previews (Gradio button padding)

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -89,12 +89,12 @@ footer {{ display: none !important; }}
89
  box-shadow: none !important; background: none !important; }}
90
  .card-title {{ font-size: .85rem; font-weight: 500; color: {SOFT}; margin: 0 2px; line-height: 1.2; }}
91
  .ex-list {{ display: grid; grid-template-columns: 1fr 1fr; align-content: start; gap: 8px; height: 330px; margin-top: 8px; overflow-y: auto; padding-right: 2px; }}
92
- .ex {{ position: relative; display: block; width: 100%; height: 0; padding: 0 0 56.25%; border-radius: 10px; overflow: hidden;
93
  border: 1px solid {LINE}; background: {TRACK}; box-shadow: none; cursor: pointer;
94
  transition: border-color .16s, box-shadow .16s; }}
95
- .ex:hover {{ border-color: {ACCENT}; }}
96
- .ex.on {{ border-color: {ACCENT}; box-shadow: 0 0 0 2px {ACCENT}; }}
97
- .ex video {{ position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
98
  pointer-events: none; }}
99
  #example-pick {{ display: none !important; }}
100
  #run {{ margin-top: auto; flex: none; height: 44px; min-height: 44px; }}
 
89
  box-shadow: none !important; background: none !important; }}
90
  .card-title {{ font-size: .85rem; font-weight: 500; color: {SOFT}; margin: 0 2px; line-height: 1.2; }}
91
  .ex-list {{ display: grid; grid-template-columns: 1fr 1fr; align-content: start; gap: 8px; height: 330px; margin-top: 8px; overflow-y: auto; padding-right: 2px; }}
92
+ #examples .ex {{ position: relative; display: block; width: 100%; height: 0; padding: 0 0 56.25%; border-radius: 10px; overflow: hidden;
93
  border: 1px solid {LINE}; background: {TRACK}; box-shadow: none; cursor: pointer;
94
  transition: border-color .16s, box-shadow .16s; }}
95
+ #examples .ex:hover {{ border-color: {ACCENT}; }}
96
+ #examples .ex.on {{ border-color: {ACCENT}; box-shadow: 0 0 0 2px {ACCENT}; }}
97
+ #examples .ex video {{ position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
98
  pointer-events: none; }}
99
  #example-pick {{ display: none !important; }}
100
  #run {{ margin-top: auto; flex: none; height: 44px; min-height: 44px; }}