Small scrolls even with sufficient dimensions

Panel seems to add scrolls even when height and width is sufficient. It feels like the overflow: auto is better than overflow: scroll. I want scroll to be True as the content can be dynamic.

pn.Column(
    pn.Spacer(background='red', width=200, height=200),
    pn.Spacer(background='green', width=200, height=200),
    scroll=True, height=420
).servable()
1 Like

Hi @govinda18,

If I increase the height to 450 there is no scroll bar so would seem 420 hasn’t taken into account all the padding between and around the spacers. I guess though I don’t know what the padding is and maybe when the scroll bars are introduced they maybe encroach on the space so perhaps as you’ve highlighted there is indeed sufficent space but then it becomes less and you now have to push the boundaries out to take the bars into account maybe

import panel as pn
pn.extension()

pn.Column(
    pn.Spacer(background='red', width=200, height=200),
    pn.Spacer(background='green', width=200, height=200),
    scroll=True, height=450
)

image

1 Like

Yes, but in such cases scroll bar should not show up at all I feel. Basically instead of overflow as scroll, shouldn’t the css be overflow as auto?

I think I see what your saying now, I don’t have content that changes size but manually adjusting fire fox can see that the scroll bar appears when necessary and reverts to no bar at all including disabled scroll not shown when content fits in frame

With scroll = True, scroll bar always seems to appear for me. Is that not the case for you?

Hi @govinda18.

It is the same case I just misinterpreted what you had said I think, for me it is either in a greyed out mode (but still visible) when there is ‘enough’ space or active mode with clickable bar when not enough space.

My last post is just the web browser firefox specifically which I think you would like scrollbar feature to function like which unless there some magic someone knows I think this would be a feature request.