diff options
| author | Andrew Lee <alee14498@protonmail.com> | 2024-01-20 00:31:03 -0500 |
|---|---|---|
| committer | Andrew Lee <alee14498@protonmail.com> | 2024-01-20 00:31:03 -0500 |
| commit | 84df8d3ccb2b5e40f8a5a90ecd71e0ab463483be (patch) | |
| tree | 9bbefc8254a9a8681ba46a98b959e940b34364be /src/styles/index.css | |
| parent | 57965c763f38db0b7f48cae40169e52274a936cb (diff) | |
| download | personal-website-84df8d3ccb2b5e40f8a5a90ecd71e0ab463483be.tar.gz personal-website-84df8d3ccb2b5e40f8a5a90ecd71e0ab463483be.tar.bz2 personal-website-84df8d3ccb2b5e40f8a5a90ecd71e0ab463483be.zip | |
Navbar responsive design; Now using grid instead of flexbox
Diffstat (limited to 'src/styles/index.css')
| -rw-r--r-- | src/styles/index.css | 46 |
1 files changed, 33 insertions, 13 deletions
diff --git a/src/styles/index.css b/src/styles/index.css index 5c05c0b..9f383cd 100644 --- a/src/styles/index.css +++ b/src/styles/index.css @@ -8,19 +8,10 @@ border-radius: 20%; } -h1 { - font-weight: 500; -} - #title { font-size: 4vh; } -h2 { - font-weight: 500; - font-size: 2.5vh; -} - ul { padding-left: 20px; font-size: 1.1em; @@ -48,11 +39,11 @@ p { } .information { - display: flex; - flex-direction: column; - flex-wrap: wrap; + display: grid; + grid-template-columns: 1fr 0.7fr; + grid-template-rows: auto auto; gap: 2vh; - padding: 30px 30px 30px 30px + padding: 30px; } .box { @@ -61,3 +52,32 @@ p { background: #3B513B; border-radius: 20px; } + +.box:nth-child(1), .box:nth-child(2) { + grid-column: 1; +} + +.latest-posts { + grid-column: 2; + grid-row: 1 / span 2; +} + +/* Mobile view */ +@media (max-width: 768px) { + .social { + font-size: 5vh; + gap: 3vh; + } + + .information { + grid: auto auto auto / 1fr; + } + + .box:nth-child(1), .box:nth-child(2), .latest-posts { + grid-column: 1; + } + + .latest-posts { + grid-row: auto; + } +} |
