Mailspring version: 1.26.0
OS: macOS 27.0.1
Theme: Darkside
Description
With the Darkside theme on macOS, the window controls (close / minimize / zoom) are drawn flush against the top edge of the window instead of being vertically centered in the toolbar. Purely cosmetic: the buttons still work.
Steps to reproduce
- On macOS, run Mailspring 1.26.0
- Preferences > Appearance > select Darkside
- Look at the top-left corner of the main window
Expected: controls vertically centered in the toolbar, as with the default theme (and as in 1.25.x).
Actual: controls touch the top edge of the window (screenshot below).
Likely root cause
Commit f83fb7a (“Fix window not draggable beneath window controls on macOS”, shipped in 1.26.0) added align-self: flex-start to .toolbar-window-controls inside the :where(body.platform-darwin) block of app/static/style/workspace.less, relying on the margin-top declared just above it for vertical positioning.
app/internal_packages/ui-darkside/styles/darkside-window-controls.less resets that margin with margin: 0, and previously relied on the container stretching to the full bar height (display: flex; align-items: center) to center the buttons. Since the :where() rules carry zero specificity, the theme’s margin: 0 wins; and with align-self: flex-start the container no longer stretches, so the buttons end up at y=0.
Less Is More is not affected, as it doesn’t reset the container’s margin.
Possible fix (untested)
In darkside-window-controls.less:
body.platform-darwin .toolbar-window-controls {
align-self: center;
}
This keeps the container sized to its buttons (so the strip below them still drags the window, which was the point of f83fb7a) while centering it in the bar. Simply replacing margin: 0 with margin-left: 0; margin-right: 0; would also restore the core margin-top, but that offset assumes 20px-tall controls, whereas Darkside’s are 14px, so they would sit ~3px above center.
Happy to open a PR if this approach is acceptable.
