Spaces:
Runtime error
Runtime error
Inline rank label with toggle buttons
Browse files- app.py +1 -1
- src/display/css_html_js.py +13 -1
app.py
CHANGED
|
@@ -86,7 +86,7 @@ with demo:
|
|
| 86 |
rank_state = gr.State(DEFAULT_RANK_BY)
|
| 87 |
with gr.Column(elem_id="benchmark-board-shell"):
|
| 88 |
with gr.Row(elem_id="benchmark-rank-toolbar"):
|
| 89 |
-
gr.
|
| 90 |
hard_rank_button = gr.Button(
|
| 91 |
"Hard",
|
| 92 |
variant="primary",
|
|
|
|
| 86 |
rank_state = gr.State(DEFAULT_RANK_BY)
|
| 87 |
with gr.Column(elem_id="benchmark-board-shell"):
|
| 88 |
with gr.Row(elem_id="benchmark-rank-toolbar"):
|
| 89 |
+
gr.HTML('<span class="rank-by-inline-text">Rank By:</span>', elem_classes="rank-by-label")
|
| 90 |
hard_rank_button = gr.Button(
|
| 91 |
"Hard",
|
| 92 |
variant="primary",
|
src/display/css_html_js.py
CHANGED
|
@@ -179,9 +179,20 @@ custom_css = """
|
|
| 179 |
.rank-by-label {
|
| 180 |
margin: 0 !important;
|
| 181 |
align-self: center;
|
|
|
|
|
|
|
| 182 |
}
|
| 183 |
|
| 184 |
-
.rank-by-label
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 185 |
margin: 0;
|
| 186 |
font-size: 13px !important;
|
| 187 |
font-weight: 600;
|
|
@@ -204,6 +215,7 @@ custom_css = """
|
|
| 204 |
z-index: 20;
|
| 205 |
width: auto;
|
| 206 |
gap: 8px;
|
|
|
|
| 207 |
align-items: center;
|
| 208 |
}
|
| 209 |
|
|
|
|
| 179 |
.rank-by-label {
|
| 180 |
margin: 0 !important;
|
| 181 |
align-self: center;
|
| 182 |
+
min-width: 0 !important;
|
| 183 |
+
width: auto !important;
|
| 184 |
}
|
| 185 |
|
| 186 |
+
.rank-by-label .html-container,
|
| 187 |
+
.rank-by-label .html-container > div,
|
| 188 |
+
.rank-by-label .prose {
|
| 189 |
+
padding: 0 !important;
|
| 190 |
+
margin: 0 !important;
|
| 191 |
+
}
|
| 192 |
+
|
| 193 |
+
.rank-by-inline-text {
|
| 194 |
+
display: inline-block;
|
| 195 |
+
white-space: nowrap;
|
| 196 |
margin: 0;
|
| 197 |
font-size: 13px !important;
|
| 198 |
font-weight: 600;
|
|
|
|
| 215 |
z-index: 20;
|
| 216 |
width: auto;
|
| 217 |
gap: 8px;
|
| 218 |
+
justify-content: flex-end;
|
| 219 |
align-items: center;
|
| 220 |
}
|
| 221 |
|