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

Mobile (iOS and iPadOS) toggle switches in settings are not aligned properly #42

Open
jmhammond opened this issue Jun 5, 2024 · 2 comments
Assignees

Comments

@jmhammond
Copy link

If you're reporting an UI issue, make sure you take a screenshot that shows the actual bug.

Here's a screenshot from iOS showing what I mean.

ItRkODV

This is true on the standard release build of Obsidian and on the beta / testflight versions. The toggles work when I move to the default theme.

@jmhammond
Copy link
Author

I believe the issue is here in theme.css where the height is statically set to 44px, whereas in the default Obsidian theme, they use variables:

.checkbox-container {
...
  height: calc(var(--toggle-thumb-height) + var(--toggle-border-width) * 2);
}

and in their .is-mobile they set variables for mobile sizes. So:

--toggle-thumb-height: 26px; and --toggle-border-width: 2px;, so the total heigh would be 30px, not 44.

I don't know the correct answer for this, given that they might end up changing their variables for mobile, but I did want to share what is the likely culprit.

@Chrismettal Chrismettal self-assigned this Jun 6, 2024
@Chrismettal
Copy link
Collaborator

Can confirm, same thing happens on Android. Thanks for sharing the potential reason as well.

Will handle most of the open tickets in the coming days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants