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

[Feature Request] Fit to % of Width/Height #3433

Closed
jpmvferreira opened this issue Jan 6, 2024 · 2 comments
Closed

[Feature Request] Fit to % of Width/Height #3433

jpmvferreira opened this issue Jan 6, 2024 · 2 comments

Comments

@jpmvferreira
Copy link

jpmvferreira commented Jan 6, 2024

I would like to suggest having a feature which allowed the user to fit the image to a given % of the width/height available, instead of just fitting to width/height.

The reason I suggest this is because whenever I open up an image/video, it expands and takes up almost the full space available, leaving the reply bar to be partially hidden (e.g.: no info on user, date, replies, etc.).
There is also the fact that the URL tooltip on hover gets a little bit the way, but what's worse, is the download bar, because in FireFox, the download bar is an addon that renders on top of the page, meaning that 4Chan-X in unaware of it and the bottom part of the image/video gets partially cropped.

Here's a screenshot where you can see that the reply information on the top and the bottom portion of the image are cropped out:
Untitled

@saxamaphone69
Copy link
Collaborator

Could add this to your Custom CSS

:root.fit-height .full-image {
  max-height: 90vh !important;
}

The max-height itself could be changed to whatever you want. I use max-height: calc(100vh - 4rem). In fact, you might be able to use calc(100dvh - 32px) which should change when the download bar appears (might not account for the URL tooltip though, in which case make 32 bigger).

@jpmvferreira
Copy link
Author

Thanks for the reply!
I was perfectly able of taking into account the URL tooltip, but not the download bar. Maybe the download bar is very hacky and doesn't notify the browser in any way, who knows.
Regardless, I'm going to mark this as solved as now it's simply a matter of playing with CSS to get what I want to.
If I end up finding a solution to dynamically take into account the presence of the download bar (using Download Manager S3 in Firefox), I will post it here.

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

No branches or pull requests

2 participants