Skip to content

Commit f8cf0a6

Browse files
fix: improve mobile responsiveness for leaderboard website
- Remove inline styles from HTML that were overriding CSS media queries (explorer-body, explorer-nav, explorer-main, two-col layout, selects) - Move inline styles to proper CSS classes (two-col, two-col-about, two-col-main, stats-row-2col, explorer-body, explorer-nav, explorer-main) - Fix explorer section not stacking vertically on mobile due to inline flex-direction:row and height:540px overriding the media query - Fix two-col layout not collapsing on tablet (the leaderboard wrapper div was not targeted by the old .two-col > .card selector) - Add comprehensive mobile styles at 600px breakpoint: - Smaller header/title fonts - Reduced container padding - Smaller card padding - Full-width search input and select controls - Stacked table controls layout - Smaller table font-size and cell padding - Compact buttons, code blocks, and query text - Add extra-small screen (400px) breakpoint for single-column stats - Add smooth scroll touch support for horizontally-scrolling tables - Bump CSS cache version to v5 Co-authored-by: Shreya Shankar <shreyashankar@berkeley.edu>
1 parent 28a2af3 commit f8cf0a6

2 files changed

Lines changed: 78 additions & 22 deletions

File tree

‎docs/index.html‎

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
href="https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&display=swap"
1515
rel="stylesheet"
1616
/>
17-
<link rel="stylesheet" href="./styles.css?v=4" />
17+
<link rel="stylesheet" href="./styles.css?v=5" />
1818
</head>
1919
<body>
2020
<header class="page-header">
@@ -36,8 +36,8 @@ <h1>DAB: Data Agent Benchmark</h1>
3636

3737
<main class="container">
3838

39-
<div class="two-col" style="display:flex;gap:1rem;align-items:flex-start">
40-
<section class="card" style="flex:1 1 0;min-width:0">
39+
<div class="two-col">
40+
<section class="card two-col-about">
4141
<h2>What is the Data Agent Benchmark?</h2>
4242
<p>
4343
Users across enterprises increasingly rely on AI agents to query their data
@@ -51,7 +51,7 @@ <h2>What is the Data Agent Benchmark?</h2>
5151
12 real-world datasets across 9 domains and 4 database systems (PostgreSQL,
5252
MongoDB, SQLite, DuckDB).
5353
</p>
54-
<div class="stats-row" style="grid-template-columns:repeat(2,1fr)">
54+
<div class="stats-row stats-row-2col">
5555
<div class="stat-box">
5656
<p class="stat-label">Datasets</p>
5757
<p class="stat-value">12</p>
@@ -102,7 +102,7 @@ <h2>Submit to the Leaderboard</h2>
102102
</p>
103103
</section>
104104

105-
<div style="flex:3 1 0;min-width:0;display:flex;flex-direction:column;gap:1rem">
105+
<div class="two-col-main">
106106
<section class="card">
107107
<h2>Leaderboard</h2>
108108
<p class="muted">
@@ -132,17 +132,15 @@ <h2>Per-Dataset Pass@1</h2>
132132
<p class="muted">Sort by agent to compare dataset difficulty.</p>
133133
<div class="table-controls">
134134
<label for="agent-selector">Sort by agent</label>
135-
<div class="sel" style="position:relative;display:inline-flex;align-items:center">
136-
<select id="agent-selector" style="appearance:none;-webkit-appearance:none;border:1px solid #8dacc6;background:#fff;border-radius:4px;padding:0.42rem 2.2rem 0.42rem 0.65rem;font:inherit;font-size:0.88rem;color:#0f2033;cursor:pointer;min-width:200px"></select>
137-
<span style="position:absolute;right:0.7rem;top:50%;translate:0 -50%;width:0;height:0;border-left:4px solid transparent;border-right:4px solid transparent;border-top:5px solid #3a5f82;pointer-events:none"></span>
135+
<div class="sel">
136+
<select id="agent-selector"></select>
138137
</div>
139138
<label for="agent-order">Order</label>
140-
<div class="sel" style="position:relative;display:inline-flex;align-items:center">
141-
<select id="agent-order" style="appearance:none;-webkit-appearance:none;border:1px solid #8dacc6;background:#fff;border-radius:4px;padding:0.42rem 2.2rem 0.42rem 0.65rem;font:inherit;font-size:0.88rem;color:#0f2033;cursor:pointer;min-width:130px">
139+
<div class="sel">
140+
<select id="agent-order">
142141
<option value="desc">High to low</option>
143142
<option value="asc">Low to high</option>
144143
</select>
145-
<span style="position:absolute;right:0.7rem;top:50%;translate:0 -50%;width:0;height:0;border-left:4px solid transparent;border-right:4px solid transparent;border-top:5px solid #3a5f82;pointer-events:none"></span>
146144
</div>
147145
</div>
148146
<div class="table-wrap">
@@ -163,11 +161,11 @@ <h2>Benchmark Queries</h2>
163161
<input id="query-search" type="search" placeholder="Search queries…" />
164162
</div>
165163
</div>
166-
<div class="explorer-body" style="display:flex;flex-direction:row;height:540px;overflow:hidden">
167-
<nav class="explorer-nav" style="width:210px;min-width:210px;flex-shrink:0;border-right:1px solid #c2d3e5;overflow-y:auto;background:#f2f7fc">
164+
<div class="explorer-body">
165+
<nav class="explorer-nav">
168166
<div id="dataset-list" class="ds-list"></div>
169167
</nav>
170-
<div class="explorer-main" style="flex:1;min-width:0;overflow-y:auto;padding:0.85rem 1rem">
168+
<div class="explorer-main">
171169
<div id="dataset-meta"></div>
172170
<p class="q-count" id="query-count"></p>
173171
<div id="query-list" class="q-list"></div>

‎docs/styles.css‎

Lines changed: 66 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* DAB styles v4 — 2026-03-21 */
1+
/* DAB styles v5 — 2026-03-21 */
22
/* ── Variables ───────────────────────────────────────── */
33
:root {
44
--navy: #002145;
@@ -37,6 +37,27 @@ h3 { margin: 0 0 0.4rem; font-size: 0.95rem; font-weight: 700; color: var(--blue
3737
.container { max-width: 1160px; margin: 0 auto; padding: 0 1.25rem; }
3838
.muted { color: var(--muted); }
3939

40+
.two-col {
41+
display: flex;
42+
gap: 1rem;
43+
align-items: flex-start;
44+
}
45+
46+
.two-col-about {
47+
flex: 1 1 0;
48+
min-width: 0;
49+
}
50+
51+
.two-col-main {
52+
flex: 3 1 0;
53+
min-width: 0;
54+
display: flex;
55+
flex-direction: column;
56+
gap: 1rem;
57+
}
58+
59+
.stats-row-2col { grid-template-columns: repeat(2, 1fr); }
60+
4061
/* ── Header ──────────────────────────────────────────── */
4162
.page-header {
4263
background: linear-gradient(140deg, var(--navy), var(--blue));
@@ -131,7 +152,7 @@ ul.about-list li {
131152
}
132153

133154
/* ── Tables ──────────────────────────────────────────── */
134-
.table-wrap { overflow-x: auto; }
155+
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
135156

136157
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
137158

@@ -275,13 +296,15 @@ pre.code-block code {
275296
*/
276297
.explorer-body {
277298
display: flex;
299+
flex-direction: row;
278300
height: 540px;
279301
overflow: hidden;
280302
}
281303

282304
.explorer-nav {
283-
width: 200px;
284-
min-width: 200px;
305+
width: 210px;
306+
min-width: 210px;
307+
flex-shrink: 0;
285308
border-right: 1px solid var(--border);
286309
overflow-y: auto;
287310
background: #f2f7fc;
@@ -459,15 +482,50 @@ pre.code-block code {
459482
/* ── Responsive ──────────────────────────────────────── */
460483
@media (max-width: 960px) {
461484
.hero-grid { flex-direction: column; }
462-
.two-col { flex-direction: column !important; }
463-
.two-col > .card { flex: unset !important; width: 100% !important; }
485+
.two-col { flex-direction: column; }
486+
.two-col-about { flex: unset; width: 100%; }
487+
.two-col-main { flex: unset; width: 100%; }
464488
.stats-row { grid-template-columns: repeat(2, 1fr); }
465489
}
466490

467491
@media (max-width: 600px) {
468-
.explorer-body { flex-direction: column; height: auto; }
469-
.explorer-nav { width: 100%; min-width: unset; border-right: none; border-bottom: 1px solid var(--border); height: 160px; }
492+
.page-header { padding: 1.2rem 0; }
493+
.page-header h1 { font-size: 1.35rem; }
494+
.subtitle { font-size: 0.9rem; }
495+
.container { padding: 0 0.75rem; }
496+
h2 { font-size: 0.98rem; }
497+
.card { padding: 0.85rem 0.9rem; }
498+
.explorer-body { flex-direction: column; height: auto; overflow: visible; }
499+
.explorer-nav {
500+
width: 100%;
501+
min-width: unset;
502+
flex-shrink: unset;
503+
border-right: none;
504+
border-bottom: 1px solid var(--border);
505+
height: 160px;
506+
}
470507
.explorer-main { height: auto; overflow-y: unset; }
508+
.explorer-bar { flex-direction: column; align-items: flex-start; gap: 0.5rem; padding: 0.65rem 0.9rem; }
509+
.explorer-bar .search-wrap { margin-left: 0; width: 100%; }
510+
.explorer-bar .search-wrap input { width: 100%; }
471511
.ds-meta-grid { grid-template-columns: repeat(2, 1fr); }
472512
.stats-row { grid-template-columns: repeat(2, 1fr); }
513+
.table-controls { flex-direction: column; align-items: flex-start; gap: 0.35rem; }
514+
.table-controls label { margin-top: 0.15rem; }
515+
.sel select { min-width: unset; width: 100%; }
516+
.sel { width: 100%; }
517+
table { font-size: 0.8rem; }
518+
th, td { padding: 0.38rem 0.45rem; }
519+
.hero-actions { justify-content: flex-start; }
520+
.btn { padding: 0.45rem 0.75rem; font-size: 0.82rem; }
521+
pre.code-block { font-size: 0.76rem; padding: 0.6rem; }
522+
.q-text-inline { font-size: 0.82rem; }
523+
.ds-link { font-size: 0.76rem; padding: 0.18rem 0.38rem; }
524+
}
525+
526+
@media (max-width: 400px) {
527+
.page-header h1 { font-size: 1.15rem; }
528+
.stats-row-2col { grid-template-columns: 1fr; }
529+
.ds-meta-grid { grid-template-columns: 1fr; }
530+
.stat-value { font-size: 1.3rem; }
473531
}

0 commit comments

Comments
 (0)