From e9140ee3b404f88398396a42f36413425753f889 Mon Sep 17 00:00:00 2001 From: Michal Jirku Date: Fri, 27 Nov 2020 22:37:11 +0100 Subject: [PATCH] Tweak the style to be bigger on mobile. --- _sass/stlviewer.scss | 25 +++++++++++++++++++++++++ _sass/tale.scss | 22 +--------------------- 2 files changed, 26 insertions(+), 21 deletions(-) create mode 100644 _sass/stlviewer.scss diff --git a/_sass/stlviewer.scss b/_sass/stlviewer.scss new file mode 100644 index 0000000..11d644c --- /dev/null +++ b/_sass/stlviewer.scss @@ -0,0 +1,25 @@ +.stl-viewer { + width: 100%; + padding-top: 100%; + position: relative; + text-align: center; + vertical-align: middle; + + canvas { + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + } +} + +.svs-custom { padding-top: 0% !important; margin: 0 auto; } +.svs-4-3 { padding-top: 100% !important; } +.svs-16-9 { padding-top: 100% !important; } + +@media (min-width: 600px) { + .stl-viewer { padding-top: 56.25%; } + .svs-4-3 { padding-top: 75% !important; } + .svs-16-9 { padding-top: 56.25% !important; } +} diff --git a/_sass/tale.scss b/_sass/tale.scss index 13df700..336be37 100644 --- a/_sass/tale.scss +++ b/_sass/tale.scss @@ -12,24 +12,4 @@ @import 'tale/sidenote'; @import 'tale/footnotes'; @import 'tale/navigation'; - -.stl-viewer { - width: 100%; - padding-top: 56.25%; - position: relative; - text-align: center; - vertical-align: middle; - - canvas { - position: absolute; - top: 0; - left: 0; - bottom: 0; - right: 0; - } -} - -.svs-custom { padding-top: 0% !important; margin: 0 auto; } -.svs-4-3 { padding-top: 75% !important; } -.svs-16-9 { padding-top: 56.25% !important; } - +@import 'stlviewer';