Original Itch.io post post
Hello hello!
Like in the last post, I’m talking about ‘The Lounge’. Right now, I’m focusing on the page’s scrolling.
So the way The Lounge would work is that a large amount of bfs would be listed (using and elements) for “adoption” so I wanted to set it up where you can click through pages instead of just regular scrolling.
Kinda like this:
Apparently, this is called a carousel! The Mozilla link was really helpful in setting up the columns how I wanted but I got stuck on the actual ‘snapping’ part.
At first, I couldn’t get it to work at all, then I realized that I was doing it completely wrong. I needed to manually set which elements the snap points would be on and where using ‘scroll-snap-align’. But since the amount of bfs shown at a time would change based on a person’s screen size I was like, well I can’t do it with one specific set… (This is when something you thought would be simple turns into something tedious
)
Still, I really want the snapping lol. So I messed around a bit more and realized I could use ‘:nth-child()’ to set snapping to every nth element and also set separate equations for certain screen width ranges.
But still…. another issue gahhhh
So the snapping only really looks correct and neat if the number of columns on screen are odd so you can put a snap point in the middle of the center column.
I tried setting ‘scroll-snap-align’ as ‘start’ and ‘end’ to see if it could look nice with the even columns and they both looked off. I wish there was like a way to offset or just set a px amount instead but there isn’t!
So now I’m not sure what to do orz I’m thinking of just making the elements smaller on the screen sizes that have an even amount of columns so I can get an odd number instead…… (* ̄ー ̄)
Anyways, yea that’s what I’ve been up to! Actually, I’ve been spending a lot of time using css recently! Tailwind had been my main tool when handling any type of css stuff, and I had done any plain css reluctantly ahah. But when setting up theme customization I was forced to start using css properly because I needed to set up a bunch of different classes. Then I realized css isn’t so bad! Like if you read the documentation it’s like oh this is actually pretty easy. And you get more flexibility too! Like you can adjust things down to the pixel.
But yea, Hopefully I’m done with setting up the scrolling soon so I can get to the next step! Whichever one I pick… Thinking maybe the abandon “drop-off” button.


