Fix toolbar layout: constant height and correct centering - #9
Merged
Conversation
…eakpoints - Replace left:50%/translateX(-50%) centering with left/right/margin:auto to avoid pre-transform width clamping against the viewport edge - Use width:fit-content so the toolbar is exactly as wide as its content - Add flex-shrink:0 to color strip, brush controls, and instructions to prevent compression that caused height growth on narrow viewports - Force a line break in instructions text so it's always exactly two lines - Hide instructions at 800px breakpoint (not 640px) to give controls room - Lighten mobile paint-toggle background from #9ca3af to #e5e7eb
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.
What changed
left: 50%; transform: translateX(-50%)withleft: 24px; right: 24px; margin: 0 auto. The old approach clamped the element's width against the right viewport edge before the transform ran, causing the toolbar to shrink too early.width: fit-contentso the toolbar is exactly as wide as its content rather than capped at an arbitrary 720px.flex-shrink: 0to.color-strip,.brush-controls, and.instructionsso flex never compresses them — compression caused the instructions text to wrap to extra lines and grow the toolbar height.<br>so it's always exactly two lines, height stays constant.#9ca3afto#e5e7ebso it reads as a button without being so dark.