Skip to content

Commit

Permalink
fix(css): center tables and scroll when overflow-x
Browse files Browse the repository at this point in the history
Also much nicer looking borders
  • Loading branch information
y1zhou committed Jul 3, 2020
1 parent 16e636d commit 939d348
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions assets/css/site.css
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,24 @@ article {

/* Tables */
.article-container table {
@apply table-auto mx-auto my-4;
@apply block mx-auto my-4 border-gray-400;
@apply overflow-y-hidden overflow-x-auto;
max-width: fit-content;
}

.article-container tr th {
@apply px-4 py-1 border-b-2 border-gray-400 text-left;
@apply px-4 py-1 border-b-2 text-left;
}
.article-container tr td {
@apply border px-4 py-2 border-gray-400;
@apply border px-4 py-2;
}

.article-container tr td:first-child {
@apply border-l-0;
}

.article-container tr td:last-child {
@apply border-r-0;
}

/* Overflow long math equations for MathJax */
Expand Down

0 comments on commit 939d348

Please sign in to comment.