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

Fix webkit combinator images #510

Merged
merged 2 commits into from
Jun 11, 2024
Merged

Conversation

bkDJ
Copy link
Contributor

@bkDJ bkDJ commented Jun 6, 2024

Webkit doesn't seem to allow CSS into img elements. This means Safari and all iPhone browsers have (in dark mode) black-on-black letters with serifs in the combinator diagrams. Example:

image

I use object elements to solve this. And to ensure the relative sizes stay the same, I use view boxes in the SVGs. This PR is based on fiddling in my browser, not running the site locally, so consider this un-tested and more of a proposal.

@kaikalii
Copy link
Member

kaikalii commented Jun 10, 2024

In testing this (in Windows Firefox), I find that, because the <object> tag is used, right-clicking the images no longer gives image-related options.
I can still merge without this, but is there a way to fix?

@bkDJ
Copy link
Contributor Author

bkDJ commented Jun 11, 2024

It's "possible" but would involve some ugly workarounds. If someone wants the SVGs, forcing them to "examine the element's HTML" or "look at the source code in this repo" are not great options, but still probably better than polluting CSS or JS for such a rare use case. :/

@kaikalii
Copy link
Member

I can make clicking it open the svg

@kaikalii kaikalii merged commit d15ee22 into uiua-lang:main Jun 11, 2024
1 check passed
@bkDJ
Copy link
Contributor Author

bkDJ commented Jun 12, 2024

Awesome, thanks for merging this, now it looks correct on my tablet:

image

@kaikalii
Copy link
Member

Ah, the font is still wrong though 😔

@bkDJ bkDJ deleted the fix-webkit-combinator-img branch June 20, 2024 21:59
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.

2 participants