diff --git a/static/scss/bookview.scss b/static/scss/bookview.scss index 5641040e..c001aec6 100644 --- a/static/scss/bookview.scss +++ b/static/scss/bookview.scss @@ -1,14 +1,9 @@ @import 'foundation'; -@include breakpoint (small down) { +@mixin mobile() { .wrapper { - display: grid; - grid-template-columns: fit-content 1fr 20%; - grid-template-rows: auto auto; - grid-template-areas: "bookImage bookImage bookImage" - "bookSidebar bookSidebar bookSidebar" - "bookDescription bookDescription bookDescription" - "bookComments bookComments bookComments"; + display: flex; + flex-direction: column; } .pubinfo { @@ -22,11 +17,13 @@ } .bookImage { + order: 0; display: flex; justify-content: center; } .bookSidebar { + order: 1; flex-direction: row; flex-wrap: wrap; } @@ -47,29 +44,45 @@ flex: 100%; } + .bookDescription { + order: 2; + } + .bookComments { + order: 3; margin-top: 15px; } } -@include breakpoint (medium) { - .wrapper { - display: grid; - grid-template-columns: fit-content 1fr 20%; - grid-template-rows: auto auto; - grid-template-areas: "bookImage bookDescription bookSidebar" - ". bookComments ."; - margin-left: auto; - margin-right: auto; - max-width: 1000px; - } +@include breakpoint (small down) { + @include mobile(); +} - .bookDescription { - padding-right: 15px; - } - .bookSidebar { - flex-direction: column; +@supports not (grid-template-rows: auto) { + @include mobile(); +} + +@supports (grid-template-rows: auto) { + @include breakpoint (medium) { + .wrapper { + display: grid; + grid-template-columns: fit-content 1fr 20%; + grid-template-rows: auto auto; + grid-template-areas: "bookImage bookDescription bookSidebar" + ". bookComments ."; + margin-left: auto; + margin-right: auto; + max-width: 1000px; + } + + .bookDescription { + padding-right: 15px; + } + + .bookSidebar { + flex-direction: column; + } } }