diff options
| author | Dennis Fink | 2026-11-03 21:35:58 +0100 |
|---|---|---|
| committer | Dennis Fink | 2026-11-03 21:35:58 +0100 |
| commit | 9eafc41973591c32a17dec7fffd11ed6d43c1a1f (patch) | |
| tree | 65ff9049ec7c58a29c8d2dd623bd4e3bfa60992c /assets/static | |
| parent | e1353422bd67e92442a6b5cbf9763da253802e34 (diff) | |
| download | dennisfink.me-9eafc41973591c32a17dec7fffd11ed6d43c1a1f.tar.gz dennisfink.me-9eafc41973591c32a17dec7fffd11ed6d43c1a1f.zip | |
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.
Diffstat (limited to '')
| -rw-r--r-- | assets/static/css/style.css | 12 |
1 files changed, 7 insertions, 5 deletions
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; } |
