-
Notifications
You must be signed in to change notification settings - Fork 642
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
[css-overflow] Is the box a scroll container if only one of 'overflow-x' or 'overflow-y' is 'clip'? #1971
Comments
Firefox seems the only browser that supports |
Agenda+ to resolve on computing |
…xis is neither visible nor clip. #1971
@fantasai With your wording I understand that
|
We'll see if the group agrees or not, but this is a deliberate proposal. |
OK! But then the spec says
If the proposal is accepted it will mean that only one of |
FWIW, I think the intent of Might we want both of these values eventually? If so, do we really want to use the |
Since |
We started discussing this by email a long time ago, and never concluded: I said:
@tabatkins replied:
I followed up with:
and as far as I know, we're still there. PS: this mail thread was in my TODO list since 2015, albeit with a low priority 😱 |
I think if |
@dbaron I think " |
The Working Group just discussed
The full IRC log of that discussion<dael> topic: https://github.com//issues/1971#issuecomment-370692229<dael> github: https://github.com//issues/1971#issuecomment-370692229 <dael> Rossen_: florian sent regrets. can someone else take it? <dael> fantasai: There's several issues here. Main one is that we wanted to figure out what various values of overflow compute to when you set...set x axis but not y. <dael> fantasai: Before we introduced clip any value that's not visible in one axis causes the other axis compute to auto so you have a scroll container in both axes. <dael> fantasai: Clip didn't spec how to compute. In general it was supposed to not trigger a scroll container. <dael> fantasai: Combo of clip in one axis and visible in the other seems to be valid and should not cause visible to compute to auto <fantasai> https://github.com/w3c/csswg-drafts/commit/1d1a8e9caf4333518620e32f2a8b08ec3efdfa13 <dael> fantasai: We updated computed value field. That's the first request. Current text says if one axis is not visible or clip then any axis that's visible or clip computes to atuo or hidden <dael> fantasai: Changeset^ <dael> fantasai: That raised the question of but clip creates a BFC and visible doesn't, what happens when it's overflow:visible in one axis and clip in the other. That caused a sep discussion on if a BFC. <dael> Rossen_: WE should take these one at a time. Thought they're related I think we can resolve independantly. <dael> dbaron: Bigger issue is should clip create BFC and the other thing falls out. <dael> Rossen_: Correct. fwiw I think we had this discussion in the past and every time we do a full circle and at the end we convince ourselves that not having it be a BFC becomes complex for implementation. <dael> Rossen_: At least what I recall is are how floats that start before the element with a clip and extend past the clip region, how are they effected in terms of flow. <dael> Rossen_: If clip is intended to be render time only effect...nevermind. <dael> Rossen_: The interaction between floats that start before clipping elements or those on the side are hairy if overflow:clip is not BFC. If it is BFC it's predicatble but then you have overflowing visibly content to the lefft or right and because BFCs allow floats next to them you have overlapping content with floats. <dbaron> I didn't actually follow that... and I actually don't remember having this discussion before. <dael> Rossen_: Every time we have this discussion I recall us coming back to the BFC one makes the most sense if we have to impl. <dael> Rossen_: I'm happy to discuss one more time if people think we can arrive at a different resolution. <dael> TabAtkins: I think it's clear if there's a bfc creating context it's scroll. For clip it's just a matter of what hte intent of the value is. If as dbaron says clip is supposed to be like visible but without painting outside the bounds that's fine. Geometry will project out but it does what we're asking for here. <dael> TabAtkins: If we want to restirct geometry clip is hidden with 0 ability to scroll. We have to decide. <dael> fantasai: Or we make it effect alyout by truncating the float. <dael> TabAtkins: That's a new concept that I'd prefer not to add. <AmeliaBR> Floats affecting layout outside of the container but not painting outside the container sounds super confusing. <dael> dbaron: The two things we described extend existing concepts and don't require huge changes. If we create one of those concepts we may decide to make the other in the future so we should name appropraitely. <dael> TabAtkins: IN that case, on naming issue, perhaps we can plan for visible-clip and hidden-clip to suggest they're same as base...wait...doesn't make sense. <dael> Rossen_: What was the motivation use case here? <dael> TabAtkins: I presume dbaron can explain the visible unscrollable <dael> dbaron: It's what css2.0 spec. The hidden creating a scroll container and bfc was new to 2.1. It's what the WG rec recommended for a decade. <dael> Rossen_: and you're only impl? <dael> dbaron: I think so. Other impl did hidden in terms of scrolling. <dael> Rossen_: If this is back compat with not compat reature should we decide? <dael> dbaron: I don't think that's why it was added to spec. <dael> Rossen_: Was it used anywhere? <dael> dbaron: Internally. not externally. <dael> fantasai: I think idea was to not have some of the hidden side effects like a scroll container. <dael> fantasai: Has a bit more effect on stuff now then in the past. In the past it meant you have slightly different perf considerations. Sometimes certain user events can scroll a hidden thing. Currently if you turn something into a scroll container it catches things like scroll snap <dael> Rossen_: This is a large topic. I think this is perfect for whiteboard between sessions thing and convince ourselves one way or another. And then hopefully we have florian. Should we table? <dael> TabAtkins: I'm fine right now resolving clip is the visible but doesn't paint outside the bounds thing. I can see use cases for it as fantasai describes. Doesn't disturb margin or capture scroll snaps. <dael> Rossen_: Margin collapsing and everything else? <dael> TabAtkins: Same as visibility. <dael> Rossen_: Visibility:hidden takes layout space. <dael> TabAtkins: This will too <dael> Rossen_: No, it says you stop at the bounds of your container. Which means if you have a whole bunch of floats or 0 height divs with negative margins that effect after clip but they're overflowing, do you take that into account? <dael> TabAtkins: I'm not willing to spec something that clips geometry. I'd be happy with the it's like visible buy clips paining <dael> Rossen_: If you don't have floats and a div with overflow-clip:veritical and a bunc hof text with at the end a div with a huge negative bottom margin. It overflows. <dael> Rossen_: After the clip the div isn't visible nor is the content. Is the negative margin in effect? <dael> TabAtkins: Full geometry. Exactly like visibility:hidden but you extend the geometry <dael> dbaron: I'm not sure visibility:hidden is greatest analogy, but it's purely a paint time effect. Layout is the same as overflow:visible but descendors outside bounds are clipped <dael> frremy: We haave requests for overflow:hidden but have position sticky work and I think this fixes that. <dael> TabAtkins: That's good. Another thing scroll containers block. Nice use case. <dael> TabAtkins: I'm seeing good reasoning for a purely paint time clipping. You'll have weird looking stuff sometimes, but that's going to be rare. If you don't want that use overflow:hidden <dael> Rossen_: And we shouldn't ask people to do that with clip or clip path? How many other ways do we have for clipping? <dael> Rossen_: This was the intent of css clip in 2.1 <dael> TabAtkins: Good point. <dael> dbaron: Clip in 2.1 was only for abspos. We can't change that due to compat. <dael> Rossen_: I don't think we can undo the things in the past. What we can do is narrow down this issue and see if we can get consensus <dael> Rossen_: Sounds like most people feel like overflow:cip is a paint time only operation and we shouldn't require that a element with overflow as clip in either direction be a BFC. The note in the spec would be yes geometry and everything else works as it does before and if geometry overflow it will have side effects. <fantasai> +1 <dael> Rossen_: Would people object to this as a resolution? <dael> RESOLVED: overflow:clip is a paint time only operation and we shouldn't require that an element with overflow as clip in either direction be a BFC nor a scroll port. <TabAtkins> Yeah, not seeing why we shouldn't just use clip-path here. Need to recall what the syntax is of just clipping to border box. <dael> Rossen_: Now if overflow computes to clip in one direction or visible in the other. If we have overflow...I'm confused if we need a resolution. If you have overflow auto or scroll in one direction the other is hidden by default. If you have clip in one direction the other is visible. <dael> TabAtkins: We need a resolution because we have termonoloy that talks about this. <dael> Rossen_: What would you want to call this? <dael> TabAtkins: Dunno <dael> fantasai: I'm confused that we need. If we have the reoslution we need to resolve on the changes in the issue. <dael> TabAtkins: We have various specs that have behavior when overflow is non-visible, but it means when it causes a scroll container. So clip now falls into visible so we need specs to refer to a term. <dael> Rossen_: Can we replace to overflow computes to scrollable or non-scrollable? <dael> fantasai: It's editorial. We don't need a resolution. <dael> TabAtkins: Yeah. But we need to do it. <dael> Rossen_: No more resolutions needed and we can move on? |
Sorry for missing the meeting. There are a few things that are missing in this resolution. The resolution above isn't clear about this, but various comments during the discussion, as well as #1971 (comment) suggest that places that require something to be (non) visible, should be changed to require something to be (non) visible or clip. I think it depends on which case we're talking about:
Also, Along the way, we had discussed how the vast majority of So, all in all, I am a bit skeptical of the above resolution: are people willing to implement If yes, I'm not super convinced by the resolution, but I suppose I can live with it. |
(agenda+ to follow up while it's reasonably fresh on everyone's mind) |
Let's discuss this with a whiteboard in person. |
Okay, so this is the "create a scroll container, but make it completely unscrollable" use-case that we couldn't come up with during the telcon. It's separate and distinct from the "no scroll container, but clipped" value that we want for other use-cases, and which is currently exposed by Moz as a prefixed value. |
Yes, this is identical to |
The Working Group just discussed
The full IRC log of that discussion<dael> Topic: overflow:clip<florian> https://github.com//issues/1971#issuecomment-377078084 <florian> github: https://github.com//issues/1971#issuecomment-377078084 <dael> florian: Missed the telecon where we discussed. We recently resolved overflow:clip does not trigger BFC. I think it failed to considered some of the things that implies. <dael> florian: The motivation that triggered adding to spec was usage in combo with contain:paint so you can have contain:paint with text overflow or resize property. Only apply to overflow not visible elements. We don't want to use contain:paint with overflow:hidden because UA might look for too many resources. <dael> florian: If overflow:clip does not creat a BFC are impl comfrotable saying resize and text overflow applies to elements that are overflow:clip? <dael> TabAtkins: During discussion before we couldn't come up with you'd want overflow without scrolling, this is the reason. There are properties that depend on things being non-visible. <dael> florian: Resize. <dael> fantasai: I think it doesn't matter for resize. <dael> florian: I'm not saying should not apply. but if we're going with it's not a BFC we also have a bunch of properties that should change to not visible or clip. <dael> dbaron: There were use caes for the opposite. <fantasai> and I think that 'text-overflow' should never have keyed off of 'overflow' <dael> TabAtkins: This is the use case for this situation. WE only can up with use cases for the other resolution. Something tha tacts like overflow:visible but it's clipped. <dael> florian: NOt effect margin collapsing. <dael> TabAtkins: Or sticky or scrollsnap. <dael> TabAtkins: This is a reason for the opposite where it's like hidden but don't scroll. <dael> dbaron: They can't apply for text:overflow partly because this is a purely paint time effect. <dael> florian: This is also a purely paint time. <dael> fantasai: True. <dael> dbaron: I guess those two could maybe be changed to not include the visible. Nothing is like this because we've put overflow does not equal visible across all our specs where that's not what we mean. <dael> fantasai: I think a lot that key off overflow not visible key off if it's a BFC. <dael> fantasai: I think a lot of things are keying off that. There's many effects that key off of that and we don't have to handle the spec. There may be sone that don't. <dael> florian: That we need to rename was mentioned. If we clarify that doesn't apply to text-overflow and resize that solve my first concern. <dael> florian: Are we okay closing that sub topic? <dael> astearns: Additional concerns? <dael> florian: Assuming we don't find another problem we can clarify the previous resolution to mean text-overflow and resize refer to non-visible elements. <fantasai> fantasai: To rephrase Florian without negatives, text-overflow and resize apply to elements with 'overflow: clip' just as they apply to elements with 'overflow: hidden' <dael> florian: The second concern was about what overflow:clip means when applied to the document or body element and propegate to viewport <dael> fantasai: Same way we transpate visible to auto we translate clip to auto. <dael> florian: That's good. <dael> s/transpate/translate <dael> astearns: Resolve on both? <dael> astearns: Prop: text-overflow and resize apply to elements with 'overflow: clip' just as they apply to elements with 'overflow: hidden' <dael> RESOLVED: text-overflow and resize apply to elements with 'overflow: clip' just as they apply to elements with 'overflow: hidden' <dael> astearns: Prop 2: when overflow:clip is propagated to the viewport it's changes to overflow:hiddent he same way visible is changed to auto <dael> RESOLVED: when overflow:clip is propagated to the viewport it's changes to overflow:hidden the same way visible is changed to auto <dael> astearns: You're fine with the resolution? <dael> florian: Yes. I'm mildly skeptical, but not objecting. |
csswg-drafts/css-overflow-3/Overview.bs Lines 386 to 388 in c8425bc
@frivoal This seems to imply that |
Addresses the comment in #1971 (comment)
@Loirooriol Thanks. This is fixed now. |
Addresses the comment in w3c#1971 (comment)
According to https://drafts.csswg.org/css-overflow-3/#ref-for-propdef-overflow%E2%91%A3,
visible
andclip
prevent the box from being a scroll container.hidden
,scroll
andauto
force the box into being a scroll container.visible
is not a problem because it computes toauto
if one ofoverflow-x
oroverflow-y
is notvisible
.However, what happens if one of
overflow-x
oroverflow-y
isclip
and the other ishidden
,scroll
orauto
?Is the box a scroll container or not?
Maybe a box could be a scroll container in one direction but not in the other one. Or maybe
clip
could compute tohidden
similarly tovisible
.The text was updated successfully, but these errors were encountered: