I'm looking at a redesign that bends live HTML as the page scrolls, using CSS without JavaScript. The effect currently works only in Chromium browsers and is disabled on smaller screens. How does it work, and what should I consider for longer articles?
How does a paper-bending effect work for a reading-focused website?
Answers
The bend uses an SVG filter with feDisplacementMap to shift pixels and make the page look curved. The tricky part is that Chromium uses nearest-neighbor sampling for this, so moving content can show noticeable aliasing. Handling subpixel coverage helps smooth the result.
Applying the effect to live HTML rather than a canvas snapshot also lets the page keep normal text selection and native scrolling.
Reply to this answer
Cool effect, but I'd be careful with it in the middle of a long article. If lines appear to shift while someone is reading, it can be hard to keep their place. Consider keeping the article area flatter and letting the bend be more noticeable elsewhere.
Reply to this answer
Make sure the flat version still feels intentional in Firefox and Safari. A brief note could explain why the effect isn't visible there, and respecting reduced motion would give readers another way to avoid the movement.
Ruvlixa.6p:
The effect is also disabled on smaller screens, so a mobile check won't necessarily show it even in Chrome.
Reply to this answer
The paper theme gives the site some personality without needing to turn the whole page into an image. One possible extra would be a draggable control on the side for scrolling the paper, if it fits the rest of the design.
Reply to this answer
Add your answer
Answers are reviewed before publication.
p.472!vordeli:
Line length is worth watching too. A change while you're halfway through a sentence could be pretty distracting.