-
Notifications
You must be signed in to change notification settings - Fork 636
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-scroll-snap] Do scroll-margin-* properties accept percentages? #3289
Comments
Well |
Looks like an error during the Computed Value line updates. I'll fix it. |
…imply that it takes a percentage. #3289
@fantasai So am I correct in thinking a snapport with height of 200px would allow a child element to snap 50px off the top edge when using |
@jonjohnjohnson Ah, no, scroll-margin doesn't accept percentages. If you look, the fix was to remove the stray mention of them from the Computed Value line. It was explicitly decided not to include them on 'scroll-margin' because, unlike for scroll-padding which is specified on the scroll container, it wasn't clear what the percentage should be relative to: the scrollport? the element's own size? it's containing block width? something else? So we left percentages out of the scroll-margin value space until/unless it becomes clear what they most need to do. |
@fantasai IMHO I think the group should give another look at |
Should the value accept percentages, or should the computed value exclude percentages?
https://drafts.csswg.org/css-scroll-snap-1/#propdef-scroll-margin-top
https://drafts.csswg.org/css-scroll-snap-1/#propdef-scroll-margin-block-start
https://drafts.csswg.org/css-scroll-snap-1/#propdef-scroll-margin
The text was updated successfully, but these errors were encountered: