idolezal commited on
Commit
8990dde
1 Parent(s): e82502a

Change CSS element ID to element Class

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -91,39 +91,39 @@ custom_css = """
91
 
92
  footer {visibility: hidden}
93
 
94
- #leaderboard-table tr:first-child th {
95
  background-color: var(--table-even-background-fill);
96
  }
97
 
98
- #leaderboard-table th:first-child, #leaderboard-table td:first-child {
99
  position: sticky;
100
  left: 0;
101
  z-index: 1;
102
  background-color: inherit;
103
  }
104
 
105
- #leaderboard-table th:nth-child(2), #leaderboard-table td:nth-child(2) {
106
  position: sticky;
107
  left: var(--cell-width-0);
108
  z-index: 1;
109
  background-color: inherit;
110
  }
111
 
112
- #leaderboard-table th:nth-child(3), #leaderboard-table td:nth-child(3) {
113
  position: sticky;
114
  left: calc(var(--cell-width-0) + var(--cell-width-1));
115
  z-index: 1;
116
  background-color: inherit;
117
  }
118
 
119
- #leaderboard-table th:nth-child(4), #leaderboard-table td:nth-child(4) {
120
  position: sticky;
121
  left: calc(var(--cell-width-0) + var(--cell-width-1) + var(--cell-width-2));
122
  z-index: 1;
123
  background-color: inherit;
124
  }
125
 
126
- #leaderboard-table th:nth-child(5), #leaderboard-table td:nth-child(5) {
127
  position: sticky;
128
  left: calc(var(--cell-width-0) + var(--cell-width-1) + var(--cell-width-2) + var(--cell-width-3));
129
  z-index: 1;
@@ -146,12 +146,12 @@ with (gr.Blocks(theme=gr.themes.Soft(text_size=text_md), css=custom_css) as main
146
  with gr.Tab("Overall"):
147
  gr.Markdown(LEADERBOARD_TAB_TITLE_MARKDOWN)
148
  results_table = gr.DataFrame(leaderboard_server.get_leaderboard(), interactive=False, label=None,
149
- visible=True, elem_id="leaderboard-table")
150
  for c in categories:
151
  with gr.Tab(c):
152
  gr.Markdown(LEADERBOARD_TAB_TITLE_MARKDOWN)
153
  results_table = gr.DataFrame(leaderboard_server.get_leaderboard(), interactive=False, label=None,
154
- visible=True, elem_id="leaderboard-table")
155
 
156
  with gr.Tab('Model details'):
157
  gr.Markdown(MORE_DETAILS_MARKDOWN)
 
91
 
92
  footer {visibility: hidden}
93
 
94
+ .leaderboard-table tr:first-child th {
95
  background-color: var(--table-even-background-fill);
96
  }
97
 
98
+ .leaderboard-table th:first-child, #leaderboard-table td:first-child {
99
  position: sticky;
100
  left: 0;
101
  z-index: 1;
102
  background-color: inherit;
103
  }
104
 
105
+ .leaderboard-table th:nth-child(2), #leaderboard-table td:nth-child(2) {
106
  position: sticky;
107
  left: var(--cell-width-0);
108
  z-index: 1;
109
  background-color: inherit;
110
  }
111
 
112
+ .leaderboard-table th:nth-child(3), #leaderboard-table td:nth-child(3) {
113
  position: sticky;
114
  left: calc(var(--cell-width-0) + var(--cell-width-1));
115
  z-index: 1;
116
  background-color: inherit;
117
  }
118
 
119
+ .leaderboard-table th:nth-child(4), #leaderboard-table td:nth-child(4) {
120
  position: sticky;
121
  left: calc(var(--cell-width-0) + var(--cell-width-1) + var(--cell-width-2));
122
  z-index: 1;
123
  background-color: inherit;
124
  }
125
 
126
+ .leaderboard-table th:nth-child(5), #leaderboard-table td:nth-child(5) {
127
  position: sticky;
128
  left: calc(var(--cell-width-0) + var(--cell-width-1) + var(--cell-width-2) + var(--cell-width-3));
129
  z-index: 1;
 
146
  with gr.Tab("Overall"):
147
  gr.Markdown(LEADERBOARD_TAB_TITLE_MARKDOWN)
148
  results_table = gr.DataFrame(leaderboard_server.get_leaderboard(), interactive=False, label=None,
149
+ visible=True, elem_classes="leaderboard-table")
150
  for c in categories:
151
  with gr.Tab(c):
152
  gr.Markdown(LEADERBOARD_TAB_TITLE_MARKDOWN)
153
  results_table = gr.DataFrame(leaderboard_server.get_leaderboard(), interactive=False, label=None,
154
+ visible=True, elem_classes="leaderboard-table")
155
 
156
  with gr.Tab('Model details'):
157
  gr.Markdown(MORE_DETAILS_MARKDOWN)