From 9eafc41973591c32a17dec7fffd11ed6d43c1a1f Mon Sep 17 00:00:00 2001 From: Dennis Fink Date: Tue, 3 Nov 2026 21:35:58 +0100 Subject: Unify spacing around bordered and floated elements This introduces a shared `--border-margin` variable to keep spacing consistent around the table of contents, figures, and floated images. It also adds bottom spacing to the floated table of contents so surrounding article content has more breathing room. --- assets/static/css/style.css | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'assets/static') diff --git a/assets/static/css/style.css b/assets/static/css/style.css index a4185f8..8da502c 100644 --- a/assets/static/css/style.css +++ b/assets/static/css/style.css @@ -55,6 +55,8 @@ CUSTOM PROPERTIES --default-border-radius: 0.5rem; + --border-margin: 1rem; + --breakout-xxs: 2rem; --breakout-xs: 4rem; --breakout-sm: 8rem; @@ -520,7 +522,7 @@ article { &:not(:last-child) { float: left; - width: calc(2 / 3 * 100% - 1rem); + width: calc(2 / 3 * 100% - var(--border-margin)); @media (max-width: 700px) { float: none; @@ -589,7 +591,7 @@ article { padding: 0.75rem; box-sizing: border-box; float: right; - margin-left: 1rem; + margin: 0 0 var(--border-margin) var(--border-margin); width: calc(1 / 3 * 100%); & > p { @@ -842,7 +844,7 @@ figure:not(.trail) { max-width: 100%; border: 1px solid var(--foreground); border-radius: var(--default-border-radius); - margin: 1rem 0; + margin: var(--border-margin) 0; padding: 0.75rem; &:has(+ h3) { @@ -968,13 +970,13 @@ img.round { &.left { float: left; - margin-right: 0.75rem; + margin-right: var(--border-margin); margin-top: 0; } &.right { float: right; - margin-left: 0.75rem; + margin-left: var(--border-margin); margin-top: 0; } -- cgit v1.3.1