From 3fe204d8459802782ee0b901f1d4168a7f21e31f Mon Sep 17 00:00:00 2001 From: Ben Fairless Date: Mon, 30 Nov 2026 11:09:00 +1100 Subject: [PATCH] Fix logo cut off at phone width - Scale the header logo from its left edge instead of the centre of the 186px box, which pushed its left edge about 36px outside a 400px viewport - Size the box to the artwork (87px standard, 107px Pro) so scaling from the left adds no horizontal scroll - Drop the Pro logo's 10px background-position nudge, as both logos are now left-aligned Resolves #1190 Assisted-by: Claude Code:claude-sonnet-5-5 --- app/assets/stylesheets/responsive/custom.scss | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/app/assets/stylesheets/responsive/custom.scss b/app/assets/stylesheets/responsive/custom.scss index 31785c131..0a892ed46 100644 --- a/app/assets/stylesheets/responsive/custom.scss +++ b/app/assets/stylesheets/responsive/custom.scss @@ -208,18 +208,21 @@ a.link_button_green_large { // https://css-tricks.com/a-complete-guide-to-svg-fallbacks/ position: relative; z-index: 2; - background: image-url("logo.svg") no-repeat 0 0 / 100% 100%; + // Scale from the left edge, with the box sized to the artwork (28px high, from + // the SVG's 284:92 viewBox). Scaling the host's 186px box about its centre + // pushed the artwork's left edge outside the viewport at phone width, and + // scaling it from the left would add horizontal scroll. + width: 87px; + background: image-url("logo.svg") no-repeat 0 0 / auto 100%; transform: translate(0, 5px) scale(3); + transform-origin: 0 50%; } .banner--pro .site-title__logo { + width: 107px; // 28px high, from the Pro SVG's 350:92 viewBox background-image: image-url("alaveteli-pro/logo.png"); background-image: image-url("alaveteli-pro/logo.svg"), linear-gradient(transparent, transparent); - // The Pro logo is wider than the standard one, so it is centred 10px further - // left in the box. Shift it to keep its left edge in line with the standard - // logo, without moving the box (which would add horizontal scroll). - background-position: 10px 0; } .navigation {