fix(web): align the sidebar T3 Code lockup on a shared baseline - #1
Closed
meisolated wants to merge 1 commit into
Closed
fix(web): align the sidebar T3 Code lockup on a shared baseline#1meisolated wants to merge 1 commit into
meisolated wants to merge 1 commit into
Conversation
The wordmark and "Code" were centered as two separate boxes with a -translate-y-px nudge on the text. Centering aligns boxes, not baselines, so the pair only lined up for a font whose ascent and descent match the default stack: with a custom interface font (Settings -> Appearance) the word drifted ~2px above the mark, and a fixed 1px nudge does not scale with the interface font size either. Put the mark and the word in one line box so the mark rides the text baseline as an inline replaced element, and replace the fixed gap with a real word space that scales with the font.
Author
|
Reopened against upstream: pingdotgg#7312 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The wordmark and "Code" in the sidebar header were centered as two separate flex boxes, with a
-translate-y-pxnudge on the text to make them look level. Centering aligns boxes, not baselines, so the pair only lined up for a font whose ascent and descent match the default stack. With a custom interface font (Settings -> Appearance) the word drifts above the mark — measured ~2px on THICCCBOI (0.80em/0.20em vs Segoe UI's 1.079em/0.251em) — and the fixed 1px nudge does not scale with the interface font size either.Now the mark and the word share one line box, so the mark rides the text baseline as an inline replaced element and follows whatever font is set.
align-baselineoverrides Tailwind preflight'ssvg { vertical-align: middle }. The fixedgap-1becomes a real word space that scales with the font.Before (interface font THICCCBOI, 16px): "Code" sits ~2px above the mark's baseline. After: not yet captured in a running client — happy to add the pair if wanted.