CSS subgrid is such a useful tool in your belt. Not sure why it's a little difficult to wrap your mind around, but it's worth the effort.
https://t.co/xjAQxJW8kn
An easy way to make your interface feel more responsive is to add a subtle scale down effect when a button is pressed.
A scale of 0.97/0.98 scale on the :active pseudo-class with a ~150ms transition should do the job.
Making a ✨stacked✨ avatar list using maskImage. Works against any transparent background!!
Using @tailwindcss v4. Recorded and edited using https://t.co/kAB6MTE4RE
You can augment your @shadcn / @radix_ui popovers and dropdown menus using origin-aware animations... and you only need ONE more line of CSS 🤯
It's even shorter with @tailwindcss v4, but I've included the v3 syntax too 🫡
Keep reading for examples and implementation 🧵:
If you're using @radix_ui / @shadcn Popover component and need to prevent PopoverContent from following your PopoverTrigger, just use PopoverAnchor ✅
(Keep reading 🧵 for an interactive explanation)
If you create global scopes, it's natural to have other scopes that pair with it.
Think about the `SoftDeletingScope`; it adds other useful methods to the builder: `withTrashed` and `onlyTrashed`.
Want to achieve something similar? Add an `extend` method to your scope class👌
// NJ
If you're leveraging Rule::exists to ensure submitted ID's of a model are valid and you need to access to a model scope that's only available on the model itself, you can create a new query, apply the scope, convert it to a base instance, then pass it in as a sub-query
So, here's one reason I always use the Gate facade for authorization.
If I wanted to translate every authorization response to something else, like 404, I just set it one time 👍
// NJ