-
Notifications
You must be signed in to change notification settings - Fork 709
[css-overflow-3][css-overflow-4][css-box-3] A switch for bottom/right (end) overflow to not be scrollable contribution, like top/left (start) #3953
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
Comments
You mean like |
No, hence mentioning
I think what you're suggesting is use of some extra non-semantic wrapper inside the scroll container? Instead of something, on a scroll container, that can just make bottom edge crossing geometry, like a I can't use <scrollport>
<content>tall overflowing content</content>
<block style="height: 50px; margin-bottom: -50px;">attempts to negate scrollable overflow</block>
</scrollport> Shows a block attempting, but failing to negate overflow, unlike if crossing top edge. |
OK, so you want the contents that overflow the box to still scroll, but content that overflows what would have been the content-box edge if the box were auto-sized to be clipped. Yes? Can you give some examples of where this is needed? |
Yep In the changes following #1971 (comment) we have
So... <scrollport style="overflow-x: clip; overflow-y: scroll;">
<sliding-side-menu style="transform: translateX(100%)"></sliding-side-menu>
<content></content>
</scrollport> Still creates scrollable overflow and things like tab keys can break the hidden overflow. And this morning was caught off guard when attempting to use the benefits of negative margins in a sticky position scheme... Open in firefox, using Scroll the light grey box up and down, between boundaries see the top blue bar sits at top edge, but the bottom blue bar doesn't sit at the bottom edge. Because of negative margin still creates scrollable overflow. Sure It's true this can be remedied by always adding an extra wrapper around all the scrollable content inside the scroll container with |
OK, so the first case would be solved if we made As for the second, I'm having trouble following what you're trying to do. Maybe a simplified testcase would help? |
Yep, this would solve for how currently the spec would require a non-semantic
Negative margins allow for some interesting scroll effects with position sticky, but though a negative bottom margin may create a shorter content box for the immediate sticky elements parent, it does not pass that "shorter content edge" up to the scroll container, with the scroll container expanding its scrollable overflow to contain the sticky element. So... <scrollport>
<box>
<content></content>
<sticky style="margin-bottom: -100px"></sticky>
</box>
</scrollport> In this example, the It might be simply put as a way to contain scrollable overflow to the size of immediate descendant(s) flow? This would match top/left? I also wonder what this means for scrollable overflow regarding alignment/logical specs for scroll content aligning/starting on the bottom/right flowing upward/leftward? And again, won't |
@jonjohnjohnson So... why do you have a negative margin here in the first place? Like I have no idea what you're trying to do here or why. |
@fantasai Sorry, I do realize the test case is far from concise, and moreso my explanation. I'm using negative margins because of their usefulness within the sticky positioning scheme (see #2496), to make "bookends" that cover the main scrolling content at the beginning and end of the scroll container. But sometimes the bookends and scrollHeight are both small enough that scrollable contribution breaks the layout when using In other news, I'll close this in confidence that #8361 gets us a solution which won't require |
https://drafts.csswg.org/css-overflow-3/
https://drafts.csswg.org/css-overflow-4/
I know historically we have the whole from top/left nature of the web that makes things like transforms, abspos, and negative margins across bottom/right edges create scrollable overflow, but doesn't when crossing top/left edges. This definitely makes sense being the default in many situations, but I have had to hack my way around bottom/right edges enough times to wish there was a switch that made all edges "trim" like top/left, regardless of used
overflow
orclip-path
values.With issues like #3068, #129, #3653, & #3665 being ironed out, I wonder if an
overflow-trim
property, akin tomargin-trim
could be a switch fromauto
totrim
that allows bottom/right, logical end, directions to behave the same as top/left, logical start, directions, where descendent geometry could cross those boundaries and not contribute to the nearest scrollable ancestors overflow?The text was updated successfully, but these errors were encountered: