Hacker Newsnew | past | comments | ask | show | jobs | submit | tqx's commentslogin

Often derided as "scroll jacking" or more politely referred to as "scroll snapping" it's being added to the CSS spec so likely not going anywhere.

https://drafts.csswg.org/css-scroll-snap-1/

Here I want to learn about the features of Square Banking but I can't do so at a glance, on the landing page for Square Banking. The best solution is to just give up and search Google News for a summary:

https://finance.yahoo.com/news/square-launches-banking-busin...

https://web.archive.org/web/20210720152407/https://finance.y...


This behaviour has nothing to do with scroll snapping.

Scroll snapping is just "can i have a carousel without javascript", and is primarily a touch interaction. See this extremely brief demo https://codepen.io/tutsplus/pen/qpJYaK?editors=1100

I wouldn't call Square's site "scroll hijacking" - usually we use that to refer to when the actual native scroll behaviour/events are highjacked and prevented, and custom javascript scrolling happens. Instead on the Square site the DOM page is still scrolling natively, but an animation is progressed depending on the native page position. Maybe not ideal, but its much smoother and less jarring than actual scroll jacking.


From TFA:

> For instance, it is easy for a user to land at an awkward scroll position which leaves an item partially on-screen when panning.

> To this end, this module introduces scroll snap positions which enforce the scroll positions that a scroll container’s scrollport may end at after a scrolling operation has completed.

Which is exactly what this page is doing.

> primarily a touch interaction

It's exclusively a scroll interaction, whether the pointer event is the result of mouse or touch input.

> the DOM page is still scrolling natively

I'm not sure what you're trying to say by "DOM page." JS is reacting to the scroll position of the viewport. The user experience is the same.


Sorry to disagree. The interaction you see in the page is not scroll snapping.

With scroll snapping you the user have always control of the scrollable content. What you do not have control over is where it will stop scrolling. A similar behavior to forced guides in a movable element on rails (such as drawers).

This page doesn’t scroll at all, and uses the scroll as a time control for a “movie”. And that is scroll jacking, as it hijacks the scroll position to do something completely different.

This page, at least on mobile, is also guilty of implementing it in the worst way possible: without any alternative scroll indications and without smooth continuous transitions that make it clear that you are controlling the animation through the scroll.

Apple is somewhat better at doing this since the scrolljacking procedure usually brings you to an element which, at the end of a glamourous entrance, actually scrolls away with the page.


It might sound similar, but it's very different in practice.


Does this page enforce the scroll positions that a scroll container’s scrollport may end at after a scrolling operation has completed, in practice?


I tried scrolling that demo with my mouse wheel and it "snapped" quite spastically down to 4. Even once I realized what the intended behavior was, it was still difficult to control: https://youtu.be/1A1c51GFGoc

Seems to work as intended with the touchpad, to the point where it was hard to even tell that the browser was doing something different.


From my experience, scroll snapping is quite nice. On the mobile view of https://www.nytimes.com/, if you scroll down enough, you'll find an example of a scroll snapping row of opinion pieces.

It is 10x better than scroll jacking. Scroll jacking is so repulsive to see anywhere you aren't using a mouse wheel.


Ugh.

On the other hand, at least if it's in CSS, it'll be a single standard method that you can turn off via a browser plugin or whatever, rather than everyone rolling their own.


Yeah, we'll never see an Apple device with USB-C, besides all of their laptops. Those chargers are great for Android phones!


The iPad Pros and 4th Gen have USB-C. Not sure why the iPhone doesn't at this stage.


Because Apple wants to make more money on lightning cables.


Also the iPad Pro :)


No, it will not override the CSS (not sure what you mean by "accessibility enabled" exactly).

> even with the focus outline disabled on other sites, I am able to navigate with the keyboard to text input fields

Correct, but for a user with vision problems, the focus outline lets them see what has focus. CSS doesn't stop them from inputting values.

Focus styles are essential and should not be removed as a best practice (in general, this is a very small site).


I haven't seen someone use "NPCs" unironically in this context since...2018? I thought it was just used now to make fun of how unoriginal the right is.

Do you still say "cuck" too?!


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: