From 2af6f293ec06c24be9d30cd3ae78f912a9e448ef Mon Sep 17 00:00:00 2001 From: Kenneth Jao Date: Thu, 13 Jun 2024 00:02:19 -0500 Subject: [PATCH] Allow for proper zoom along with correct print sizing --- resume/main.css | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/resume/main.css b/resume/main.css index 863feeb..e60e3c9 100755 --- a/resume/main.css +++ b/resume/main.css @@ -1,22 +1,21 @@ -@media (min-aspect-ratio: 8.5/11) { /* Aspect ratio larger than 1. */ +@media (min-aspect-ratio: 11/8.5) { /* Aspect ratio larger than 1. */ html { height: 100%; width: 100%; display: flex; align-items: center; background: linear-gradient(0deg, #2a2a2a 0%, #4b4b4b 50%, #2a2a2a 100%); - font-size: calc(1vh * 8.5/11); } body { - height: 100%; + width: 100rem; aspect-ratio: 8.5/11; margin: auto; } } -@media (max-aspect-ratio: 8.5/11) { /* Aspect ratio less than 1 */ +@media (max-aspect-ratio: 11/8.5) { /* Aspect ratio less than 1 */ html { height: 100%; width: 100%; @@ -27,7 +26,24 @@ } body { + width: 100rem; + aspect-ratio: 8.5/11; + margin: auto; + } +} + +@media print { + html { + height: 100%; width: 100%; + display: flex; + align-items: center; + background: linear-gradient(0deg, #2a2a2a 0%, #4b4b4b 50%, #2a2a2a 100%); + font-size: 1vw; + } + + body { + height: 100%; aspect-ratio: 8.5/11; margin: auto; }