Empty area between image and bottom bar wastes screen real estate [AnkiMobile]

Hmm, content insets hidden under top and bottom toolbars would be perfectly fine.

But why is the bottom one visible? And only the bottom one — analogously, why don’t we ever see a similar white area on top? There also is a top bar, which needs such an inset.

If the content height ≤ the available area, then there’s no scrolling involved, so no inset needs to take up additional vertical space, leaving less space to the actual content (my very first screenshot). In this case, if there is an inset, it should be hidden under the bottom bar, freeing up these pixels for the content, without a scrollbar.

If the content height > the available area, then I shouldn’t be able to scroll so far as to pull the inset from under the bottom bar.


But like I say, my main issue is that I cannot create a rectangle that occupies the whole height of the available area:

  • I cannot create a rectangle of height of the cyan line without scrollbars.

  • I can only create a rectangle of height of the purple line without scrollbars.

These additional pixels are always lost if I don’t want a scrollbar, which seems like a waste, and a UX issue that could be improved.

Your complaints are valid, and I’ll need to revist this area in the future anyway when more of the desktop’s reviewer gets integrated into the mobile clients.

1 Like

Cool, thanks! :tada:

(BTW, I wonder why the bottom inset height isn’t dependent on bottom bar height. It’s always of the same height.)

I’m not sure off the top of my head, as the code is setting the insets based on the bottom bar height. There may be something else going on.

1 Like

A little bump so that the issue doesn’t close automatically. :slight_smile:

I already left myself a reminder: Migrate the reviewing screen to Svelte and sandbox if possible · Issue #3871 · ankitects/anki · GitHub

1 Like

Okay, thanks a lot! :raising_hands:

That might suggest that there’s some CSS that would make it work fine on your screen too [moving this thread to Card Design].

@Danika_Dakika, hey, perhaps we should move it back, since it’s an iOS-specific bug, and not something that can be fixed with CSS alone?

That’s fine, I can move it back. But it’s already been added to the issue tracker, so it doesn’t seem like there’s anything more we can do here.

1 Like

@michalrus In my debugging of a similar issue disabling the bottom bar fixes the issue but obviously suboptimal if you want the bottom bar (I think it’s a bottom bar inset and since that’s rendered outside the reviewer web view it can’t be changed by card js?)

While keeping bottom bar, I used 100 dvh instead of vh which fixed the scroll issue but you do still have that gap above the bottom bar.

2 Likes

@Danika_Dakika, thanks! At least the category is correct, if someone would be looking for it. :slight_smile:

@jbhul thanks! That’s a very nice trick. I’ll re-do my cards to use that instead of a the current and more complicated calc(100vh - something).

Hey, any updates? Is it somewhere on the roadmap? :slight_smile:

1 Like

The issue dae mentioned above is being worked on, there is a PR for that. See

2 Likes

@Anon_0000, that’s awesome news, thanks!

I tried that instead of calc(100vh - something), but—at least on iOS—the dvh seems to be constantly changing while you scroll… And then elements referencing 100dvh are flickering. So this solution won’t work for cards that don’t fit on a single screen.