Skip to content

Commit

Permalink
yegor256#188 - make tables responsive
Browse files Browse the repository at this point in the history
+ reduce table overal font size
+ make tables responsive (after 1024px they turn into plain lists)

related issues: yegor256#182 and yegor256#89
  • Loading branch information
filfreire committed Feb 28, 2019
1 parent 5da3f7b commit 5374d78
Showing 1 changed file with 47 additions and 2 deletions.
49 changes: 47 additions & 2 deletions scss/_tables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ th {
td,
th {
border-bottom: (.06 * $em) solid $gray;
overflow: auto;
padding: .825 * $em $em;
text-align: left;
vertical-align: top;
Expand All @@ -42,5 +41,51 @@ thead th {

table {
display: table;
overflow-x: auto;
width: 100%;

@media all and (max-width: 1024px) {
display: none;
}

thead {
@media all and (max-width: 1024px) {
display: none;
}
}

tr {
border-bottom-width: .12 * $em;

th {
border-bottom-width: .12 * $em;
}

td,
th {
overflow: hidden;
padding: .3 * $em .2 * $em;

@media all and (max-width: 1024px) {
display: inline-block;
border: 0;
}
}

th, td {
font-size: 65%;
}

span, code {
font-size: 80%;
}

@media all and (max-width: 1024px) {
display: inline-block;
margin: .6 * $em 0;
}
}

@media all and (max-width: 1024px) {
display: inline-block;
}
}

0 comments on commit 5374d78

Please sign in to comment.