- From: CSS Meeting Bot via GitHub <noreply@w3.org>
- Date: Wed, 29 Apr 2026 15:46:32 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed ``[cssom-view] scroll and client properties of `<input>` elements / `overflow-clip-margin: content-box`.``, and agreed to the following: * `RESOLVED: clientRect matches the overflow-clip-margin rect, and scrollRect is relative to that (i.e. scrollLeft = 0 is the initial scroll position)` <details><summary>The full IRC log of that discussion</summary> <fantasai> i/Subtopic: [cssom-view-1]/Topic: CSSOM and CSSOM View<br> <fantasai> emilio: input elements clip to the content-box edge, is a bit weird<br> <fantasai> emilio: In Firefox clientLeft includes the padding<br> <fantasai> emilio: But overflow-clip-margin should maybe be consistent ...<br> <fantasai> emilio: Do people feel strongly about this? I think FF is sensible.<br> <fantasai> emilio: The coordinates don't quite make sense<br> <fantasai> astearns: Before considering overflow-clip-margin: content-box<br> <fantasai> astearns: is what you get from clientLeft interoperable or not?<br> <fantasai> emilio: I need to retest the current state<br> <fantasai> emilio: Haven't really seen compat issues<br> <fantasai> emilio: Makes sense that client area would not include thing you cannot scroll<br> <fantasai> emilio: thoughts?<br> <fantasai> emilio: For inputs, if we're interoperable, we can leave it as is<br> <astearns> ack emilio<br> <fantasai> emilio: but for overflow-clip-margin we have opportunity to choose the right behavior<br> <emilio> ack emilio<br> <flackr> fantasai: overflow-clip-margin doesn't change how far you can scroll. if we want to use it for inputs need to be able to scroll to end so the content fits in content box<br> <flackr> fantasai: I know we made some changes for certain cases in block layout in inline axis<br> <flackr> fantasai: as long as you can scroll to the end making it visible in the content box, using overflow-clip-margin seems like a good idea rather than a scroller inside a box.<br> <flackr> fantasai: it makes the content model much more straight-forward<br> <flackr> scribe+<br> <fantasai> emilio: That would be a behavior change ... it's common to put background-image and (missed)<br> <fantasai> emilio: On block layout, if you have padding and overflow on the inline axis, the padding is part of what you scroll, whereas for inputs it's not<br> <fantasai> emilio: Consider you have 'white-space: nowrap' and 'padding-inline: 10px'<br> <fantasai> emilio: In a block that's a scroller, you see the padding-start, which is blank, and then you can scroll the "padding area" of the scroller is inside of what you scroll<br> <fantasai> emilio: The clip doesn't ...<br> <fantasai> emilio: The scrollport is not used by the padding.<br> <fantasai> emilio: That's the main difference<br> <fantasai> emilio: What you're proposing is the input would start showing the end of the content, instead of the padding area<br> <flackr> fantasai: that's why we have overflow-clip-margin: content-box. OCM should always be w.r.t. the scrollport<br> <flackr> fantasai: The idea of the input would be display: inline-block; overflow-clip-margin: content-box; would cause it to clip any content outside of the content box from the perspective of the scrollport<br> <flackr> fantasai: we just need to make sure the scrollable area has padding attached to the scrollable content so that you can scroll to the end<br> <fantasai> flackr: Is this the thing that doesn't work right now?<br> <flackr> fantasai: we're working on adding padding to the end of scrollable areas to see where we can add it. Think it can be added for a number of different boxes, e.g. flex and grid, blocks in the block axis. The inline axis may be tricky<br> <flackr> fantasai: For this to work, we need that to work, we'll have to check in with ian<br> <fantasai> emilio: If you think of the scroll container as like two different boxes, one inside the other<br> <fantasai> emilio: I guess, to the main question of this issue, should clientLeft depend on overflow-clip-margin<br> <fantasai> emilio: I think it probably should<br> <flackr> q+<br> <fantasai> emilio: Other mental model is the clip is reduced, but you do this weird padding thing then it kinda works out?<br> <astearns> ack fantasai<br> <fantasai> emilio: If you ask for clientRect of something you want the rect that's visible, and that's the content area<br> <astearns> ack flackr<br> <fantasai> flackr: The other way it could work is that the scrollable area is sufficiently large that even though the clientRect includes the clipped region, you can scroll all the content into view<br> <fantasai> emilio: That feels really weird<br> <fantasai> emilio: Could make the same argument for (?) and then clientRect is just the border-box instead of the padding-box<br> <fantasai> emilio: I think you want the area that's visible<br> <fantasai> emilio: People use this to check whether something is overflowing or not<br> <fantasai> emilio: I guess for that case if both are consistent.<br> <fantasai> flackr: I get it, does make sense for clientRect to represent the visible portion<br> <fantasai> astearns: Is there a proposed resolution on the interaction of overflow-clip-margin and clientRect?<br> <fantasai> emilio: I think ideally both scrollRect and clientRect ... clientRect gets reduced by [missed]<br> <fantasai> emilio: That implies that clientLeft, clientTop, etc.<br> <fantasai> emilio: get reduced by the padding area<br> <fantasai> emilio: if you have 'overflow-clip-margin: content-box'.<br> <fantasai> flackr: Can you specify 'overflow-clip-margin' to arbitrary values?<br> <fantasai> [discussion about positive vs negative values]<br> <fantasai> flackr: Would you choose the 'overflow-clip-margin' or the content box?<br> <fantasai> emilio: If you're expanding the scroller outside somehow then clientLeft should be negative somehow?<br> <fantasai> emilio: Whatever 'overflow-clip-margin' clips.<br> <fantasai> emilio: Make clientRect match that<br> <fantasai> flackr: It's a bit weird that (?)<br> <fantasai> emilio: overflow-clip-margin is weird, if it had applied to scrollers from the beginning it would have made more sense<br> <fantasai> PROPOSED: clientRect matches the overflow-clip-margin rect<br> <fantasai> emilio: scrollLeft of zero should be the start of the client, like if you set scrollLeft = 0 then that should scroll to the start<br> <fantasai> astearns: So because scrollRect is defined in terms of clientRect it should be fine?<br> <fantasai> emilio: Maybe we should be explicit about that<br> <fantasai> PROPOSED: clientRect matches the overflow-clip-margin rect, and scrollRect is relative to that (i.e. scrollLeft = 0 is the initial scroll position)<br> <fantasai> RESOLVED: clientRect matches the overflow-clip-margin rect, and scrollRect is relative to that (i.e. scrollLeft = 0 is the initial scroll position)<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13502#issuecomment-4345295618 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 29 April 2026 15:46:33 UTC