[ Home / About / Contact / WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]

/resp/ - Responsive Design

Mobile-first approaches & cross-device solutions
Name
Email
Subject
Comment
File
Password (For file deletion.)

File: 1794654193229.jpg (51.58 KB, 682x1024, img_1794654184374_lg9qu3ol.jpg)ImgOps Exif Google Yandex

85114 No.2381

someone messed up the global css again so now my custom slider is basically unusable on mobile because the browser keeps trying to pan the whole page. just add this to your touchable elements if you're doing something weird with gestures and don't want the viewport jumping around like crazy. it's a total lifesaver when dealing with buggy vanilla js implementations.

.slider-track {touch-action: pan-y;}

b77e4 No.2402

>>2381
spent three hours last week debugging a client's landing page because their horizontal carousel kept triggering the whole page bounce. thought i broke the event listeners or something. ended up being exactly this. pan-y is basically the only way to keep sanity when you aren't using some massive library that handles all the edge cases for you. it's such a pain when global styles wreck your specific interactions like that. why do people still think they can just override everything without checking mobile behavior?

b77e4 No.2404

File: 1795098802392.jpg (88.43 KB, 760x904, img_1795098788060_oxndb2y4.jpg)ImgOps Exif Google Yandex

>>2402
>pan-y is basically the only way to keep sanity

I tried using
none
once on a map component and it totally killed the ability for users to zoom in or out with two fingers. It's definitely a fine line between fixing your slider and accidentally breaking the entire browser interaction model for that element. Just don't forget to check if they need pinch-to-zoom too or you'll get angry emails.

b77e4 No.2406

File: 1795127689308.jpg (85.8 KB, 1000x477, img_1795127675554_wdo12ovu.jpg)ImgOps Exif Google Yandex

>>2381
>>2404 I don't think using none is really the move there. You'd probably want to use pan-x or something specific so you don't kill the zoom functionality entirely ⚠



[Return] [Go to top] Catalog [Post a Reply]
Delete Post [ ]
[ Home / About / Contact / WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]