@flackr (but yep, I see that the explainer itself is not that new, just didn't see it before)
The prototype looks good! Seems to recalc the fragments too often when resizing, but understandable for the prototype, haha.
What I am happy to see: any work on fragmentation. Could that mean that multi-column block element breaking is a tiny bit closer? (I know it is outside this particular explainer and prototype, but whenever I see fragments, I think of multicol and how it needs more love).
@flackr I'll need to spend more time thinking about all of this, but one quick thought:
I don't like the idea of having the interactive elements created as pseudo-elements, or a need to manually place elements and then somehow associate them with the fragments etc.
But what if (wild idea incoming)… an ability to declare a `<template>` which would be used for every fragment? Maybe even with some built-in slot content that could be used, like for the markers, “page count” etc.
@flackr Like, having some way to merge declarative shadow DOM, fragment creation from CSS & custom interactivity from an element… I can see how things like that could be potentially done in a way that could also be adapted to other use cases.
I immediately imagined a way to provide a `<template>` to a `<details>`, as a way to override its built-in layout, for example.
But an ability to map automatically created fragments to templates… would require some containment probably, but so alluring!
@kizu To make sure I understand, you're suggesting instead of just having a :fragment pseudo to style, each fragment would be an instantiation of your template with the content in some slot?
This is an interesting idea, my main concern would if this DOM needs to be reflected to the developer?
@flackr Yep, I think you understood correctly. Can you elaborate on the “reflected to the developer” concern? Is it “providing access to it”, or something else? I can see how if it is created “automatically” based on the layout and some CSS, it might be either something read-only, or private maybe?
Disclaimer: I did not work a lot with web components and the JS part of DOM a lot, so might be wrong in some of my assumptions about how things might work and what is viable or not :)
@flackr Yeah. I typically work around this by (ab)using `position: sticky` to place the buttons within the scroll container.
It would be cool if there was a `pointer-events: click` or something so that scroll gestures fall through to the underlying view!
@flackr Nice 🤩. Would love to see pure css carousels replace JS implementations :)
One wish, since it's almost Christmas:
Some carousels add space around the content so that every "snap-point" can be reached.
One example is the Codepen carousel. There is space on the left and the right side so that all codepens can be scrolled to the center. (Not scroll-snap, but still)
Would it be possible to extend the scrollable overflow, so that all snap-points are reachable?
Problem It is possible to define unreachable snap points. The used snap position will then be the position resulting from scrolling as much as possible towards the snap position. But, in many compo...