Skip to content

[css-overflow] spec text for scrollable end-edge padding needs clarification  #6315

Closed
@dholbert

Description

@dholbert

In https://drafts.csswg.org/css-overflow-3/#scrollable , the first bullet-point ("the box’s own content and padding areas") and the fifth bullet-point ("padding on the end-edge side...") need some clarification.

It's not clear to me which of those two bullet points is intended to be responsible for the final 30px of padding creating the scrollable overflow in this example (markup below at [1]):
https://jsfiddle.net/dholbert/w40undve/

Also, the fifth bullet-point needs some clarification about what box the padding is added to, when creating a rect to be unioned. Right now it says "The scrollable overflow area is the union of: [...] * Padding on the end-edge sides of the scrollable overflow rectangle representing the end-side padding applied to the scroll container" . I'm not sure precisely what this bullet-point is calling for, but it sounds a bit like it's asking for us to first determine the scrollable overflow rect per earlier bullet points (including e.g. out-of-flow children that we serve as the CB for, and super-tall grandchildren), and then add the container's end-edge padding to that scrollable overflow. That's not what implementations actually do, though, as shown by this example:
https://jsfiddle.net/dholbert/3vk9nj16/
(the same as my earlier fiddle except that I've added position:absolute to the flex item, basically).

In this second example, the padding does not get added to the overflow area created by the abspos descendant, in Gecko or Chromium or WebKit. So I think we need to be sure to phrase that fifth bullet point such that it doesn't sound like it's calling for that.

[1] Markup for my first jsfiddle above:
CSS:

.flex {
  display: flex;
  height: 100px;
  width: 100px;
  padding-right: 30px;
  padding-bottom: 30px;
  border: 3px solid black;
  background: lime;
  overflow: auto;
}
.item {
  height: 150px;
  width: 150px;
  flex: none;
  background: teal;
}

HTML:

<div class="flex">
<div class="item">
</div>
</div>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions