From a3099cad0384ac35bbfbf2cb61bf609425eb4ff8 Mon Sep 17 00:00:00 2001 From: interlope Date: Mon, 1 Jun 2026 23:27:56 +0200 Subject: [PATCH] fix: update button icon alignment for back-to-top and code copy buttons --- css/style.css | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/css/style.css b/css/style.css index 760bc5e..1342a0e 100644 --- a/css/style.css +++ b/css/style.css @@ -1629,10 +1629,14 @@ footer.footer-modern a:hover { background: var(--accent-hover); } -/* display:block neutralises Bootstrap Icons' vertical-align:-.125em so the - glyph sits dead-centre inside the flex button */ +/* The fills the button and flex-centres its ::before glyph, so neither + Bootstrap Icons' vertical-align:-.125em nor glyph side-bearing can offset it */ .back-to-top i { - display: block; + display: flex; + align-items: center; + justify-content: center; + width: 100%; + height: 100%; line-height: 1; } @@ -1681,7 +1685,11 @@ footer.footer-modern a:hover { } .code-copy i { - display: block; + display: flex; + align-items: center; + justify-content: center; + width: 100%; + height: 100%; font-size: 0.95rem; line-height: 1; }