正在加载视频...
视频加载失败
CSS Trick 🙃 Need to change your scrollbar position? You can flip the scrollbar position for an element using a double invert 🙂 ul, li { scale: 1 -1; } /* y-axis flip */ A negative scale inverts the element on that axis ✨ For a bonus, control the... show more
101,031 次观看 • 2 年前 •via X (Twitter)
10 条评论

Here's that @CodePen link! 🚀 Should be good in all browsers and a nifty trick to solve the problem For horizontal scrolling, you could also use "direction" but cascading negative scale feels nicer IMO 😎 cc @BowserSZN 🤙

Codepen Link missing:

Beat me to it! 🤙😅🥇

Dude, I love your tutorials - they are great. I’m wondering how do you go about setting up this css patterns within a next js app, do you create a module.css for each component, or a mix between tailwind and a module.css - I’m curious and also looking to have a more solid pattern

To be honest - Need to open source "Brick Yourself" as that kinda shows my approach For the most part, I go Tailwind and then use the global style file with className on the relevant pieces of UI. Find this keeps me mindful of the styles I'm adding 💯

FYI #cs_internship @maryam_davoudi @Ali_Sdg90 @sadeghiiw_

This is cool, but from an annoyingly “jakobnielseny” usability perspective I’m wondering whether you should do this or not. It’s quite established that scrollbars are on bottom and right. Changing this might confuse the user about what is the target container of the scrollbar. NeXT computers had the scrollbars in the left side but since then I can’t remember any other examples. I had a similar case in a project with a big separately scrolling table. Moving the scrollbar on top was suggested but we decided to implement chevron buttons as “overflow indicators” instead.

Bro, what app do you use to record those videos?

Awesome!

Yeah – Totally! 💯 They're awkward in general 🥲 Keen to see scrollbar-gutter land in Safari though 🫶
