SIAI2025 / styles /css_tables_wrappers.py
taku404's picture
update UI
7b95663
# css_tables_wrappers.py - Wrappers, policies, and table-specific shared rules
CSS_TABLES_WRAPPERS = """
/* Avoid scrollbar gutter desync */
.result-table .gradio-dataframe, .result-table .wrap, .history-table .gradio-dataframe, .history-table .wrap{
overflow-y:hidden!important; scrollbar-gutter:stable both-edges;
}
/* Result tables shared */
.result-table th, .result-table td{ text-align:left!important; }
.result-table{ width:100%!important; margin-top:0!important; }
/* Index narrow */
.result-table thead th:first-child, .result-table tbody td:first-child{ width:4ch!important; padding-left:6px!important; padding-right:6px!important; }
/* History table fixed layout */
.history-table .gradio-dataframe table{
table-layout:fixed!important; width:100%!important; border-collapse:separate!important; border-spacing:0!important;
}
.history-table .gradio-dataframe th, .history-table .gradio-dataframe td{ padding:8px 10px!important; box-sizing:border-box!important; }
/* Jobs list (DataFrame版のスタイル) */
.jobs-list,
.jobs-list .gradio-dataframe,
.jobs-list .dataframe,
.jobs-list [data-testid="dataframe"],
.jobs-list [data-testid="dataframe"] > div,
.jobs-list .wrap{
max-height:none!important; height:auto!important; overflow:visible!important; display:block!important;
border:1px solid rgba(255,255,255,.08); border-radius:10px; padding:2px; box-shadow:var(--shadow);
}
/* Jobs list (HTMLテーブル版) - no internal scroll; match site look */
.jobs-html{ width:100%!important; overflow:visible!important; }
.jobs-html table{
table-layout:fixed!important; width:100%!important; border-collapse:separate!important; border-spacing:0!important;
background:var(--bg)!important;
}
.jobs-html thead th, .jobs-html tbody td{
padding:8px 10px!important; box-sizing:border-box!important; border:1px solid var(--line)!important;
background:var(--bg)!important; color:var(--text)!important;
white-space:normal!important; overflow-wrap:anywhere!important; word-break:break-word!important; line-height:1.5!important;
}
.jobs-html thead th{
font-weight:800!important;
}
.jobs-html tbody tr:nth-child(even) td{
background:var(--bg)!important; /* ダーク固定のためゼブラは同色で統一 */
}
"""