Skip to content

Commit cee42b9

Browse files
committed
Arrange rows in .basic-info tables vertically when horizontal space is constrained
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
1 parent 8ff3623 commit cee42b9

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

assets/scss/_styles_project.scss

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,31 @@ footer {
437437
&.basic-info th {
438438
width: 15rem;
439439
}
440+
441+
/* Arrange rows vertically when horizontal space is constrained to avoid overflowing */
442+
@include media-breakpoint-down(sm) {
443+
/* Make cells full width without vertical margin */
444+
&.basic-info th, &.basic-info td {
445+
width: 100%;
446+
display: inline-block;
447+
margin-top: 0;
448+
margin-bottom: 0;
449+
}
450+
451+
/* Remove border and padding between header & data cells to make them appear like a single cell */
452+
&.basic-info td {
453+
padding-top: 0;
454+
border-top: none;
455+
}
456+
&.basic-info th {
457+
border-bottom: none;
458+
}
459+
460+
/* Remove top border on all but the first header cell to prevent double borders between rows */
461+
&.basic-info tr + tr th {
462+
border-top: none;
463+
}
464+
}
440465
}
441466

442467
pre {

0 commit comments

Comments
 (0)