fix: center "Open Settings" button on connection error page#3
Open
charlieleith wants to merge 1 commit intoxp-technologies-dev:mainfrom
Open
Conversation
The .settings-btn rule used `left: 1/2;`, which is invalid CSS — `1/2` isn't a valid <length> or <percentage>, so the declaration was discarded and `left` fell back to `auto`. The button only appeared centered by accident, via flex static-position resolution on the body's flex layout. Replace with the standard horizontal-centering pattern: left: 50%; transform: translateX(-50%); so the button is reliably centered regardless of the parent's display.
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.
Summary
The
.settings-btnrule on the connection-error page (rendered when the BrowserView fails to load the stream URL) usedleft: 1/2;, which is invalid CSS —1/2isn't a valid<length>or<percentage>, so the declaration is discarded andleftfalls back toauto. The button only appeared centered by accident, via flex static-position resolution on the body's flex layout.Replace with the standard horizontal-centering pattern:
so the button is reliably centered regardless of the parent's
displaymode.Where it shows up
src/main/main.js→did-fail-loadhandler → inline<style>for.settings-btn(the "Open Settings" button rendered on the dark "Failed to connect" page).Test plan
pnpm lint— no new warnings onsrc/main/main.jspnpm prettier --check src/main/main.js— passes