1- /**
2- * Component styles for SWE-bench Website
3- */
4-
51/* Buttons */
62button ,
73.button {
@@ -223,6 +219,19 @@ button:focus,
223219 white-space : nowrap;
224220}
225221
222+ /* Sticky header styles - consolidated */
223+ .scrollable thead th ,
224+ .table-responsive thead th {
225+ background-color : var (--table-header-bg );
226+ box-shadow : 0 1px 0 var (--table-border );
227+ }
228+
229+ .dark-mode .scrollable thead th ,
230+ .dark-mode .table-responsive thead th {
231+ background-color : var (--table-header-bg );
232+ box-shadow : 0 1px 0 var (--table-border );
233+ }
234+
226235.table tbody tr {
227236 background-color : var (--color-background );
228237 transition : background-color var (--transition-fast );
@@ -267,23 +276,69 @@ button:focus,
267276 table-layout : fixed;
268277}
269278
279+ /* Sticky header styles for standalone scrollable */
280+ .scrollable thead {
281+ position : sticky;
282+ top : 0 ;
283+ z-index : 10 ;
284+ }
285+
286+ /* Shadow for sticky headers */
287+ .scrollable thead ::after {
288+ content : '' ;
289+ position : absolute;
290+ left : 0 ;
291+ right : 0 ;
292+ bottom : 0 ;
293+ height : 2px ;
294+ background : rgba (0 , 0 , 0 , 0.05 );
295+ }
296+
297+ .dark-mode .scrollable thead ::after {
298+ background : rgba (255 , 255 , 255 , 0.05 );
299+ }
300+
270301.data-table {
271302 width : 100% ;
272303 table-layout : auto;
273304}
274305
275306.data-table th ,
276307.data-table td {
277- white-space : nowrap;
308+ white-space : normal;
309+ }
310+
311+ /* Model name and leaderboard specific styles */
312+ .model-name {
313+ display : inline-block;
314+ white-space : normal;
315+ word-wrap : break-word;
316+ line-height : 1.4 ;
317+ hyphens : auto;
318+ overflow-wrap : break-word;
319+ }
320+
321+ .model-badges {
322+ display : flex;
323+ flex-wrap : wrap;
324+ gap : 2px ;
325+ margin-right : 5px ;
278326}
279327
280- /* Make the model column (first column) expand to fill available space */
328+ .model-badges span {
329+ line-height : 1 ;
330+ }
331+
332+ /* Column sizing for tables */
281333.table th : first-child ,
282334.table td : first-child {
283- width : 100% ;
335+ width : 40% ;
336+ min-width : 180px ;
337+ max-width : 350px ;
338+ white-space : normal;
339+ word-wrap : break-word;
284340}
285341
286- /* Set fixed widths for other columns to prevent them from expanding */
287342.table th : not (: first-child ),
288343.table td : not (: first-child ) {
289344 width : 1% ;
@@ -495,12 +550,91 @@ button:focus,
495550}
496551
497552/* Responsive adjustments */
553+ @media (min-width : 992px ) {
554+ /* On desktop */
555+ .table-responsive {
556+ overflow-x : visible;
557+ overflow-y : auto;
558+ max-height : 60vh ;
559+ }
560+
561+ /* Convert scrollable to normal table when inside table-responsive */
562+ .table-responsive .scrollable {
563+ display : table;
564+ overflow : visible;
565+ max-height : none;
566+ }
567+
568+ /* Sticky headers for table-responsive */
569+ .table-responsive thead {
570+ position : sticky;
571+ top : 0 ;
572+ z-index : 10 ;
573+ }
574+
575+ /* Shadow for table-responsive sticky headers */
576+ .table-responsive thead ::after {
577+ content : '' ;
578+ position : absolute;
579+ left : 0 ;
580+ right : 0 ;
581+ bottom : 0 ;
582+ height : 2px ;
583+ background : rgba (0 , 0 , 0 , 0.05 );
584+ }
585+
586+ .dark-mode .table-responsive thead ::after {
587+ background : rgba (255 , 255 , 255 , 0.05 );
588+ }
589+
590+ /* Allow table to take full width on desktop */
591+ .data-table {
592+ min-width : auto;
593+ }
594+
595+ /* Ensure first column doesn't take too much space on desktop */
596+ .table th : first-child ,
597+ .table td : first-child {
598+ max-width : 40% ;
599+ }
600+ }
601+
602+ @media (max-width : 992px ) {
603+ /* On mobile and tablets */
604+ .table-responsive {
605+ overflow-x : auto;
606+ overflow-y : auto;
607+ max-height : 60vh ;
608+ margin-bottom : 1rem ;
609+ -webkit-overflow-scrolling : touch;
610+ }
611+
612+ /* Convert scrollable to normal table when inside table-responsive */
613+ .table-responsive .scrollable {
614+ display : table;
615+ overflow : visible;
616+ max-height : none;
617+ }
618+
619+ /* Sticky headers for table-responsive */
620+ .table-responsive thead {
621+ position : sticky;
622+ top : 0 ;
623+ z-index : 10 ;
624+ }
625+ }
626+
498627@media (max-width : 576px ) {
628+ /* Small mobile devices */
499629 .table {
500630 display : block;
501631 overflow-x : auto;
502632 }
503633
634+ .model-name {
635+ font-size : 0.85rem ;
636+ }
637+
504638 .tabs {
505639 flex-direction : column;
506640 border-bottom : none;
@@ -660,8 +794,7 @@ button:focus,
660794.info-section ,
661795.post-info ,
662796.info-box ,
663- .benchmark-info ,
664- .leaderboard-notes {
797+ .benchmark-info {
665798 background-color : var (--color-background-alt );
666799 border-radius : var (--radius-md );
667800 padding : 1.25rem ;
@@ -673,16 +806,24 @@ button:focus,
673806.dark-mode .info-section ,
674807.dark-mode .post-info ,
675808.dark-mode .info-box ,
676- .dark-mode .benchmark-info ,
677- .dark-mode .leaderboard-notes {
809+ .dark-mode .benchmark-info {
678810 background-color : var (--gray-800 );
679811 border-color : var (--gray-700 );
680812}
681813
682814/* Leaderboard specific styles */
683815.leaderboard-notes {
816+ background-color : var (--color-background-alt );
817+ border-radius : var (--radius-md );
684818 padding : 1.5rem ;
685819 margin : 1.5rem 0 ;
820+ border : 1.5px solid var (--color-border );
821+ transition : background-color 0.3s ease, border-color 0.3s ease;
822+ }
823+
824+ .dark-mode .leaderboard-notes {
825+ background-color : var (--gray-800 );
826+ border-color : var (--gray-700 );
686827}
687828
688829.leaderboard-notes p {
0 commit comments