.
[hacks/simpleWebSlides.git] / simpleWebSlides.css
index 32fdc55..c2c72b7 100644 (file)
@@ -13,23 +13,23 @@ body {
 }
 
 .sws-canvas {
+    display:flex;
+    justify-content: center;
+    flex-direction:column;
     box-sizing: border-box;
-    text-align: center;
-    vertical-align:middle;
 }
-.sws-cover {
-    justify-content: center;
-    -webkit-justify-content: center;
+
+.sws-cover .sws-content {
     text-align:center;
 }
 
 /* Layout of a canvas */
 .sws-header , .sws-title,{
-    height:5vmin;
+    height:5%;
 }
 
 .sws-inner-canvas {
-    height: 80vmin;
+    height: 80%;
     text-align: justify;
 }
 
@@ -37,87 +37,119 @@ body {
     margin: 0;
     padding: 0;
     display: block;
-    width: 100%;
+    box-sizing: border-box;
 }
 
 .sws-footer{
-    height: 10vmin;
+    height: 10%;
 }
 
 .sws-header, .sws-title, .sws-inner-canvas, .sws-footer{
-    display:inline-block;
+    display:block;
     margin:0;
     padding:0;
     width: 100%;
     box-sizing: border-box;
+    overflow:hidden;
 }
 
-
-
-body > h1, body > h2, body > h3 {
+body > h1, body > h2, body > h3, body > a.sws-previous {
     display: none;
 }
 /*             Display Mode             */
 /****************************************/
 
 
-:root.sws-display body {
-    overflow:hidden;
-}
 
+/* display mode */
+/* Aspect is 4/3, 16/9, 16/10 (default is 4/3) */
 :root.sws-display .sws-canvas {
-    width:133.3vmin;
-    height:100vmin;
+    max-width: 100vw;
+    max-height: 100vh;
     overflow:hidden;
+
 }
 
+:root.sws-by-width body {
+    font-size: 3.5vh;
+}
+:root.sws-by-height.sws-aspect-4-3 body {
+    font-size: 2.625vw;
+}
+:root.sws-by-height.sws-aspect-16-9 body {
+    font-size: 1.96875vw;
+}
+:root.sws-by-height.sws-aspect-16-10 body {
+    font-size: 2.1875vw;
+}
 
-/* display mode */
-/* Aspect is 4/3, 16/9, 16/10 (default is 4/3) */
+:root.sws-by-width.sws-aspect-4-3 .sws-canvas {
+       width:133.3vh;
+       height:100vh;
+}
 
-:root.sws-aspect-4-3 .sws-canvas {
-    width:133.3vmin;
-    height:100vmin;
+:root.sws-by-width.sws-aspect-16-9 .sws-canvas {
+    width:177.7vh;
+    height:100vh;
 }
 
-:root.sws-aspect-16-9 .sws-canvas {
-    width:177.7vmin;
-    height:100vmin;
+:root.sws-by-width.sws-aspect-16-10 .sws-canvas {
+    width:160vh;
+    height:100vh;
 }
 
-:root.sws-aspect-16-10 .sws-canvas {
-    width:160vmin;
-    height:100vmin;
+:root.sws-by-height.sws-aspect-4-3 .sws-canvas {
+    width:100vw;
+    height:75vw;
+}
+
+:root.sws-by-height.sws-aspect-16-9 .sws-canvas {
+    width:100vw;
+    height:56.25vw;
+}
+
+:root.sws-by-height.sws-aspect-16-10 .sws-canvas {
+    width:100vw;
+    height:62.5vw;
+}
+
+:root.sws-display body::after{
+    display:inline-block;
+    height:100vh;
+    width:0;
+    content: "";
+    vertical-align:middle;
+
 }
 
 :root.sws-display .sws-canvas {
-    position: relative;
-    margin-left: auto;
-    margin-right: auto;
+    display:inline-block;
     padding: 0;
-    margin-top: 0;
-    margin-bottom: 0;
+    max-width: 100vw;
 }
 
 :root.sws-display .sws-inactive-slide {
     display: none;
 }
+
 :root.sws-display body {
     background: black;
+    overflow: hidden;
+    text-align:center;
 }
 
 
 /*                 Print Mode                 */
 /* ****************************************** */
 
-
 :root.sws-print body {
     background: white;
     width: 297mm;
-    padding: 0pt 0pt 0pt 0pt;
-    margin: 0pt 0pt 0pt 0pt;
-
+    padding: 0;
+    margin: 0;
+    font-size: 21pt; 
 }
+
 @media print {
 
     @page {
@@ -128,14 +160,12 @@ body > h1, body > h2, body > h3 {
 }
 
 :root.sws-print .sws-canvas {
-    position: relative;
     width: 297mm;
-    height: 209mm;
+    height: 210mm;
     /* not 210mm to avoid rounding errors */
     page-break-after: always;
     padding: 0pt 0pt 0pt 0pt;
     margin: 0pt 0pt 0pt 0pt;
-    overflow: hidden;
 }
 
 :root.sws-print .sws-canvas:last {
@@ -146,7 +176,6 @@ body > h1, body > h2, body > h3 {
     opacity: 1;
 }
 
-
 p { width: 100%; }
 
 /* counters for the toc */
@@ -294,10 +323,10 @@ p { width: 100%; }
     font-size: large;
 }
 
-/* embedded SVG images are inlined and their height matches twice the size of a small letter x */
+/* embedded SVG images are inlined and their height matches twice the font-size */
 object[type="image/svg+xml"] {
     display:inline-block;
     font-size:inherit;
-    height: 2.5ex;
+    height: 2em;
     vertical-align:middle;
 }
\ No newline at end of file