Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error 500: Ensure text is legible with foreground colors #581

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jtojnar
Copy link

@jtojnar jtojnar commented Jul 10, 2024

all: initial restores the color and background from the user agent style sheet. If user changes those, the text will become illegible.

  • bug fix
  • BC break? no

Here is how to change the text color in firefox: https://support.mozilla.org/cs/kb/zmena-pisma-barev-na-webovych-strankach#w_zmena-barvy-pisma

Here is how it looks like in my tweaked UI without this patch:

borked foreground

`all: initial` restores the color and background from the user agent style sheet. If user changes those, the text will become illegible.
@@ -21,8 +21,8 @@ namespace Tracy;
<style>
#tracy-error { all: initial; position: absolute; top: 0; left: 0; right: 0; height: 70vh; min-height: 400px; display: flex; align-items: center; justify-content: center; z-index: 1000 }
#tracy-error div { all: initial; max-width: 550px; background: white; color: #333; display: block }
#tracy-error h1 { all: initial; font: bold 50px/1.1 sans-serif; display: block; margin: 40px }
#tracy-error p { all: initial; font: 20px/1.4 sans-serif; margin: 40px; display: block }
#tracy-error h1 { all: initial; background: white; color: #333; font: bold 50px/1.1 sans-serif; display: block; margin: 40px }
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The initial background will probably be transparent so the background reset might not be necessary but who knows.

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