Skip to content
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-multicol-2][css-scroll-snap] Snapping to column boxes #6017

Open
fantasai opened this issue Feb 18, 2021 · 1 comment
Open

[css-multicol-2][css-scroll-snap] Snapping to column boxes #6017

fantasai opened this issue Feb 18, 2021 · 1 comment

Comments

@fantasai
Copy link
Collaborator

fantasai commented Feb 18, 2021

It's been brought up a few times before, most recently in #5911, that it would be useful to set snapping controls on the individual columns of a multi-column element to enable, for example, using multicol as a pagination mechanism with snapping between "pages".

The most straightforward way to do this would be to add a pseudo-element (e.g. ::column or ::nth-column(An+B) that represents each column. It could initially accept only the properties in css-scroll-snap, though we'll likely want to extend it to accept other properties in the future as well.

Thoughts?

p.s. With a generic name like that, though, we'll have to contend with also the question of whether to extend this to grid tracks, flex lines, and/or table rows and columns. (It's not so necessary to have this feature there, because they typically have elements we can snap to instead.)

@rachelandrew
Copy link
Contributor

Yes, very much a fan of this, the scrolling to a column thing has been mentioned to me a number of times. I like the approach of adding a pseudo-element as that could potentially enable a few other things people want to do.

In terms of extending this to grid tracks and so on, perhaps this is two separate things. One is adding to multicol a pseudo-element so we can target a particular column box, the second is to add the snapping to a identified column/track/flex line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants