3 ms·
I can see the use, but this is also kind of wild. It's live-updating if you select text, it's almost literally a separate viewport into the same content. I'm t
by danShumway 3y ago
I can see the use, but this is also kind of wild. It's live-updating if you select text, it's almost literally a separate viewport into the same content.
I'm trying to figure out the use-cases and implications of this. You can do offscreen/overflow:hidden tricks to make it work with hidden elements. But... as far as I know there's still no way without a library to convert that element to an image (for privacy reasons I suspect).
I'm sorry for kind of being all over the place, but the MDN page is pretty short and I have a lot more questions. I guess I could always apply CSS filters and distortion directly to elements, does this being treated like a background open up possibilities there? It's the first time I'm hearing about this even though it's been around for a while, and I wouldn't have suspected this would be a CSS feature even on the table. How useful is this beyond just cloning viewports (assuming I'm only targeting Firefox and don't care about Chrome)?
- sakex 3y agoCould be used for a lot of cool things, like a mirror, a magnifying glass, keeping a part of the page in view even if it is outside of the screen (for editing purposes for instance), I'm sure I'm missing many other use cases. None of them fundamentally useful but cool in their own ways.
- danShumway 3y agoThe tricky bit here is that it's not going to do things like forward events, so using this to keep the page in view won't allow selecting text for example. For some things like the mimimap here, that seems like a feature? You want it to be purely visual in that case. For other cases, I'm not sure if I should think of that as a feature or a limitation. Definitely something to play around with though.
- sakex 3y agoYes but you could make a change at the top of the page that would have an impact at the bottom, and that would be useful to see both changes at the same time.