v0.167.1: center the sidebar logo (margin: 0 auto)
.sidebar-logo was left-aligned; add auto side-margins so the 140px logo centers in the header (desktop sidebar + mobile drawer share the element). Adds TestSidebarLogo_Centered.
This commit is contained in:
@@ -1,5 +1,11 @@
|
|||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
|
### v0.167.1 — Center the sidebar logo (2026-07-24)
|
||||||
|
|
||||||
|
CSS one-liner + test. `.sidebar-logo` gains `margin: 0 auto` so the 140px logo is horizontally
|
||||||
|
centered within the header instead of left-aligned — applies to both the desktop sidebar and the
|
||||||
|
mobile drawer (same element). Pin: `TestSidebarLogo_Centered` (red-proof verified).
|
||||||
|
|
||||||
### v0.167.0 — Outlined logo + favicon (Part 4, the v0.166.0 gated follow-up) (2026-07-24)
|
### v0.167.0 — Outlined logo + favicon (Part 4, the v0.166.0 gated follow-up) (2026-07-24)
|
||||||
|
|
||||||
No agent coupling; MinAgent unchanged. Embedded-asset constants + one test only — no backend, no
|
No agent coupling; MinAgent unchanged. Embedded-asset constants + one test only — no backend, no
|
||||||
|
|||||||
@@ -88,6 +88,24 @@ func TestMobileCSS_StripRemovedDrawerPresent(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The sidebar logo is horizontally centered in its header (desktop sidebar + mobile drawer share
|
||||||
|
// the element). Red-proof: revert to `margin-bottom: 0.25rem` (no auto side-margins) → this FAILS.
|
||||||
|
func TestSidebarLogo_Centered(t *testing.T) {
|
||||||
|
data, err := StyleCSS()
|
||||||
|
if err != nil {
|
||||||
|
t.Fatalf("StyleCSS(): %v", err)
|
||||||
|
}
|
||||||
|
css := string(data)
|
||||||
|
i := strings.Index(css, ".sidebar-logo {")
|
||||||
|
if i < 0 {
|
||||||
|
t.Fatal(".sidebar-logo rule not found")
|
||||||
|
}
|
||||||
|
rule := css[i : i+strings.Index(css[i:], "}")]
|
||||||
|
if !strings.Contains(rule, "margin: 0 auto") {
|
||||||
|
t.Errorf(".sidebar-logo is not centered (no `margin: 0 auto`); rule was:\n%s", rule)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Group A — drawer markup (Scenario A/C), asserted through the real layout render.
|
// Group A — drawer markup (Scenario A/C), asserted through the real layout render.
|
||||||
//
|
//
|
||||||
// Red-proof: remove aria-controls from the burger button in layout.html → the aria-controls
|
// Red-proof: remove aria-controls from the burger button in layout.html → the aria-controls
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ body {
|
|||||||
width: 140px;
|
width: 140px;
|
||||||
height: auto;
|
height: auto;
|
||||||
display: block;
|
display: block;
|
||||||
margin-bottom: 0.25rem;
|
margin: 0 auto 0.25rem;
|
||||||
}
|
}
|
||||||
.login-logo {
|
.login-logo {
|
||||||
width: 200px;
|
width: 200px;
|
||||||
|
|||||||
Reference in New Issue
Block a user