- From: fantasai via GitHub <sysbot+gh@w3.org>
- Date: Tue, 06 Dec 2022 04:16:05 +0000
- To: public-css-archive@w3.org
> I propose that if we supported (and accumulated) scroll-padding and scroll-margin from all elements between the target and the scrolling container [...] `scroll-padding` applies to the scroll container, not to the individual elements, so I don't understand how accumulating it makes any sense...? If you want per-element padding, use `scroll-margin`. Wrt accumulating scroll-margin, this would not give good results on e.g. nested sections. Consider a document which has `section { scroll-margin: 1em; }` and the TOC links to its corresponding section elements. If we accumulated `scroll-margin`, a section nested three levels deep would have 3em of scroll margin, which is too much. > however, if you scroll down and type into the input box the browser tries to scroll it into view (which should scroll it into the optimal viewing region). This results in each keypress scrolling up. I think a reasonable thing to do here would be to except fixed and sticky elements from trying to honor scroll-padding / scroll-margin. (For stickypos, probably we'd want it to take the minimum of the scroll-margin and the sticky offset.) -- GitHub Notification of comment by fantasai Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7931#issuecomment-1338722292 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 6 December 2022 04:16:07 UTC