CSS Tip! 🎠
You can create a responsive infinite marquee animation with container queries and no duplicate items 🤙
li{ animation: slide; }
@keyframes slide {
to { translate: 0% calc(var(--i) * -100%);}}
The trick is animating the items, not the list 😎
More tricks 👇
To get this one working, you need to animate the items and not the list (Watch the video first?). Each item needs to know its row index (--i) in the list and the parent needs to know how many rows are in the list:
ul { --count: 12; }
li:nth-of-type(1),
li:nth-of-type(2) { --i: 0; }
li:nth-of-type(3),
li:nth-of-type(4) { --i: 1; }
Once you have that, translate each item based on its row index in the list
li {
translate: 0% calc((var(--count) - var(--i)) * 100%);
}
Now for the animation. The key here is that each row has an animation-delay calculated from its index (--i). That number is offset to make it negative so the animation start is offset ✨
ul { --duration: 10s; }
li {
--delay:
calc((var(--duration) / var(--count)) * (var(--i) - 8));
animation:
slide var(--duration) var(--delay) infinite linear;
}
Make sure to wrap that animation in:
@media (prefers-reduced-motion: no-preference) { ... }
Lastly, the fun parts! 🤓
To create the "vignette" mask. Use a layered mask on the container 😷
.scene {
--buff: 3rem;
height: 100%;
width: 100%;
mask:
linear-gradient(transparent, white var(--buff) calc(100% - var(--buff)), transparent),
linear-gradient(90deg, transparent, white var(--buff) calc(100% - var(--buff)), transparent);
mask-composite: intersect;
}
To create the 3D skewed effect, use a chained transform (Try toggling it in the demo ⚡️):
.grid {
transform:
rotateX(20deg)
rotateZ(-20deg)
skewX(20deg);
}
As for the responsive part, use container queries! 🔥
article { container-type: inline-size; }
When the article (card) is narrower than 400px update the grid and animation settings 🤙 Double the rows means double the duration!
@container (width < 400px) {
.grid {
--count: 12;
grid-template-columns: 1fr;
}
li:nth-of-type(1) { --i: 0; }
li:nth-of-type(2) { --i: 1; }
li:nth-of-type(3) { --i: 2; }
li:nth-of-type(4) { --i: 3; }
li {
--duration: 20s;
}
}
CSS has the magic to be able to update those animations at runtime based on your custom property values 😎
An added bonus in this demo is that it doesn't require any JavaScript at all, for any of it 🤯 We can use CSS :has() for those toggles that update the styles, even the theme toggle! 🫶
Any questions, let me know! Make sure to check out the video. Will do a walkthrough one to follow-up 🤙
@CodePen link below! 👇
We taught TypeScript the GraphQL execution language, the result? Fully typed documents without codegen!
Combine that with our LSP and we have a novel GraphQL DX!
Introducing gql.tada https://t.co/NvJKaJBdTa
Remix is dedicated to building incremental bridges to the best frontend innovations the React community has made and continues to make.
Everything after step 2 is incremental and optional.
1️⃣ Migrate from react-scripts to vite (hardest step): https://t.co/dDU3069zwD
2️⃣ Migrate to Remix SPA mode (marginal changes needed): https://t.co/qd0MxMtdCA
2️⃣½: Migrate routes to Remix route modules (incremental)
3️⃣ Turn on ssr: true in Remix Vite and deploy a JS server (no code changes needed to the app directory)
4️⃣ Start using loader/action to take advantage of full stack Remix (or not) (incremental)
5️⃣ As soon as we have RSC (it's coming) migrate loaders/actions to RSC and "use server" modules (or not) (incremental)
MAKE $10 MILLION DROPSHIPPING.
Bullshit.
I think its harder then running a brand, here’s why:
❌ u deliver shitty customer service so u get no recurring customers
❌ have to be profitable on customer acquisition costs
❌ ur always chasing the next viral product so u never get momentum
❌ u can’t SELL the brand (WHICH IS WHERE MOST OF THE $ IS MADE)
I wrote a 30 page google doc that open sources my ENTIRE operations. The sauce that took me from 0 to MILLION DOLLAR months.
Agencies, Contractors, Must-Have Apps and Tools.
All for the price of $0.
Ur welcome :)
https://t.co/GenhDGjRCz
I used to feel very guilty for not working & learning in my free time.
It took me 3 burnouts to learn how to deal with this.
Here’s what I do nowadays:
with sam and greg ousted yesterday
my initial thought yesterday was “shit they have discovered AGI” and the only person who was capable of understanding it was ilya sutskever.
now it’s seems even more an more plausible that is the case. to understand the amount of stress and pressure he must have been under i urge you to watch this short documentary.
this was recorded during the development of chatGPT. but the sincere stream of thought about the greater good AND the bad that will come from AI might put it more clear to why this might have happened.
my thesis, they have had AGI internally for a while, and Ilya, andrej karpathy might have been the first ones to grasp what they have made.
to be clear, geoff hinton regrets his life’s work (the work on AI) due to him worry about all the bad it can be used for.
maybe ilya is under similar pressure. to much for one person to bear.
regardless, we will know more soon.
i feel for all involved parties, and for the community at large. this is not great.
Argh, a scrollbar shows and the whole page shifts!
We've all seen that, right? 😅
You might know that `overflow-y: scroll` mitigates the issue by showing scrollbar all the time.
But now there's a more elegant solution:
`scrollbar-gutter: stable` just reserves the space!
Introducing shadcn/ui snippets.
Easily import and use shadcn/ui within VSCode text editor, install and try today.
Leave remarks, pull requests are welcome. 😄
- @shadcn
- @nextjs
- @code
https://t.co/yySnuxCFn9
Introducing Language Pal, easily learn languages right on your iOS Home Screen, no opening apps needed! Available now (for free!) in Pixel Pals! 🥳🇫🇷🇪🇸🇩🇪🇮🇹🌍🇨🇦🇮🇳🇨🇳🇰🇷🇯🇵