From 327f59797558343e00abe761d92c55e4e32347bb Mon Sep 17 00:00:00 2001 From: Joris Date: Sat, 9 Sep 2023 23:07:03 +0200 Subject: Improve modal style --- public/main.css | 79 ++++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 53 insertions(+), 26 deletions(-) (limited to 'public/main.css') diff --git a/public/main.css b/public/main.css index e5d3bcf..5a531fd 100644 --- a/public/main.css +++ b/public/main.css @@ -3,13 +3,14 @@ :root { --color-focus: #888833; - --width-close-button: 4rem; + --width-close-button: 3rem; --font-size-dog: 1.5rem; - --spacing-beetle: 0.25rem; - --spacing-mouse: 0.5rem; - --spacing-cat: 1rem; + --spacing-mouse: 0.25rem; + --spacing-cat: 0.5rem; + --spacing-dog: 1rem; + --spacing-horse: 2rem; } /* Top level */ @@ -25,6 +26,14 @@ body { font-family: sans-serif; } +dl { + margin: 0; +} + +dd { + margin-left: 0; +} + /* Modal */ .g-Modal { @@ -40,10 +49,28 @@ body { z-index: 1; } +.g-Modal__Content { + position: relative; + background-color: white; + width: 50%; + max-height: 75%; + border-radius: 0.2rem; + border: 1px solid #EEE; +} + +.g-Modal__Header { + display: flex; + justify-content: space-between; + align-items: center; + padding: var(--spacing-dog) var(--spacing-horse); + border-bottom: 1px solid #EEE; +} + +.g-Modal__Body { + padding: var(--spacing-dog) var(--spacing-horse); +} + .g-Modal__Close { - position: absolute; - top: 2rem; - right: 2rem; cursor: pointer; font-weight: bold; border-radius: 50%; @@ -51,25 +78,13 @@ body { background-color: transparent; width: var(--width-close-button); height: var(--width-close-button); - font-size: 2rem; - font-family: monospace; + font-size: 1.7rem; } .g-Modal__Close:hover, .g-Modal__Close:focus { background-color: #EEE; } -.g-Modal__Content { - position: relative; - background-color: white; - width: 50%; - height: 50%; - border-radius: 0.2rem; - border: 1px solid #EEE; - padding: 2rem; - padding-right: calc(2rem + var(--width-close-button) + 2rem); -} - /* Filters */ aside { @@ -165,23 +180,35 @@ header { .g-BookDetail { display: flex; - justify-content: space-between; } .g-BookDetail img { - width: 10rem; + width: 13rem; + margin-right: var(--spacing-dog); + border: 1px solid #EEE; } .g-BookDetail__Title { font-size: var(--font-size-dog); - margin-bottom: var(--spacing-beetle); + margin-bottom: var(--spacing-mouse); } .g-BookDetail__Subtitle { font-style: italic; - margin-bottom: var(--spacing-beetle); + margin-bottom: var(--spacing-mouse); +} + +.g-BookDetail dl { + display: flex; + flex-direction: column; + gap: var(--spacing-cat); +} + +.g-BookDetail dt { + display: inline; + text-decoration: underline; } -.g-BookDetail__Genres { - margin-top: var(--spacing-cat); +.g-BookDetail dd { + display: inline; } -- cgit v1.2.3