Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to Codidact Meta!

Codidact Meta is the meta-discussion site for the Codidact community network and the Codidact software. Whether you have bug reports or feature requests, support questions or rule discussions that touch the whole network – this is the site for you.

Comments on Tall profile content (image or text) causes scroll bar only on desktop

Post

Tall profile content (image or text) causes scroll bar only on desktop

+0
−0

I recently added an image to my user profile as an experiment. In the edit preview this showed in full, but after saving it shows on my profile with a vertical scroll bar and the bottom section of the image is cut off until I scroll. Notice how the dates on the horizontal axis are cut in half:

User profile containing an image that has the bottom cut off

On mobile (in portrait or landscape mode) there is no scroll bar and the image shows in full.

I have tested with a long passage of text too, and the same happens:

  • On desktop there is a vertical scroll bar and the lower half of the text is cut off until I scroll
  • On mobile (portrait or landscape mode) there is no scroll bar and the full text is visible

Is it intentional to have a height restriction in desktop mode? If so would it be better for the preview to be consistent with this? If not could the restriction be lifted, or at least increased enough that images with most standard aspect ratios do not get cut off?

History
Why does this post require attention from curators or moderators?
You might want to add some details to your flag.
Why should this post be closed?

1 comment thread

No repro here -- what browser? (5 comments)
No repro here -- what browser?
Monica Cellio‭ wrote almost 2 years ago

I just visited your profile on desktop in Chrome and I'm seeing the full image. Can you say more about your environment? (I tried changing the size of my browser window, but that didn't affect this.)

trichoplax‭ wrote almost 2 years ago

I'm using Firefox on Fedora Linux. At width 1068 pixels and narrower there is no scroll bar and the full image is visible. At width 1070 pixels and wider there is a scroll bar and a small amount of the image is cut off at the bottom.

trichoplax‭ wrote almost 2 years ago

It turns out that the containing div tag has a class of profile-text which is defined to have a max-height of 500 pixels, causing a scroll bar if the profile content (text or image or any combination) is taller than that in total.

It's overridden by a @media query in the CSS that removes the max-height if the window width is 64 em or less. I guess on my machine 64 em is roughly 1068 or 1069 pixels.

So it seems this was by design, but I don't know whether you still want that to be the design. Is it worth considering whether there needs to be a maximum height for the profile content, and if so whether it could be larger than 500 pixels?

trichoplax‭ wrote almost 2 years ago

It's also worth considering whether 1068 pixels width is where you want the switch between limited and unlimited height to happen. Maybe this was aimed at having no height limit on mobile? However, on a full HD screen viewing 2 windows side by side (so each is half width), the unlimited height will be triggered, even though it's a desktop setting.

Also, I don't know whether 64 em will reliably be 1068 pixels width. If someone overrides the font size in their browser, will this throw out the styling? Might be safer to define it in pixels instead of ems but worth double checking that. My personal leaning tends to be towards using rems for font sizing and pixels for screen size considerations.

trichoplax‭ wrote almost 2 years ago

I don't have a Chromium based browser available to test with so I don't know whether the font size on Chrome is different causing 64 em to be a much larger pixel value, or whether it's independent of browser and related to any fonts / font sizes you may have overridden.

I don't think it's uncommon for people to set a minimum font size in their browser to keep things readable (particularly on modern high resolution mobile devices) and some mobile phones have an operating system level user adjustable minimum font size which the browser may then pick up automatically. So we should probably have automated tests that take that into account at some point.