Skip to content

fix: center "Open Settings" button on connection error page#3

Open
charlieleith wants to merge 1 commit intoxp-technologies-dev:mainfrom
charlieleith:fix/error-page-settings-button-centering
Open

fix: center "Open Settings" button on connection error page#3
charlieleith wants to merge 1 commit intoxp-technologies-dev:mainfrom
charlieleith:fix/error-page-settings-button-centering

Conversation

@charlieleith
Copy link
Copy Markdown

Summary

The .settings-btn rule on the connection-error page (rendered when the BrowserView fails to load the stream URL) used left: 1/2;, which is invalid CSS1/2 isn't a valid <length> or <percentage>, so the declaration is discarded and left falls 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 mode.

Where it shows up

src/main/main.jsdid-fail-load handler → inline <style> for .settings-btn (the "Open Settings" button rendered on the dark "Failed to connect" page).

Test plan

  • pnpm lint — no new warnings on src/main/main.js
  • pnpm prettier --check src/main/main.js — passes
  • Rendered the error-page HTML in a browser before/after; button is now positioned via valid CSS instead of relying on flex fallback behaviour.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant