Hot tips are spicy lil' nuggets related to web development and tooling that I share on my twitter account. I've logged them here to make them easier to find.
Remove margins from children that touch the sides of a parent. No more selecting :last-child
2.2K33332437316K
1.3K33
Here’s a rundown of the open AI podcast show notes stuff I’ve been working on for the new syntax website.
Quality
Quality
Stop typing twice!
Here is how to collected multiple named exports and import them under a single JavaScript variable in ESM
469131512K
1524
1221353624K
Quality
Quality
CSS logical properties specifies width/height/padding/border/etc using inline + block instead of top + bottom.
But where is that actually useful?
Here is a good example I just ran into with writing-mode: vertical-rl;;
9715113725K
24651313K
Quality
Quality
The Async Context / AsyncLocalStorage API is pretty neat - you can create a store and acesss it anywhere down the callstack context without having to pass around data.
It's kind of like closure scope, but but for the async context of your function calls.
2733879489K
1373
429101910K
Quality
Quality
I had to show someone this.
I wanted to use background-clip: text; but with a canvas or video element - not just a background image.
So I came up with this monstrosity that actually works!
20916127535K
1316
200574.9K
Quality
Quality
Been hearing a lot about JavaScript Signals lately?
With just a few lines of code you can take your Vanilla JS variables and make them reactive.
Here is a little demo I whipped up using Preact Signals - can be used without a framework!
3674318149138
1757
169454.6K
Quality
Quality
Server side alert(), prompt() and confirm() are actually pretty handy.
Deno has them, along with coloured console.log();
3393362541K
1212
122183.1K
Quality
Quality
This is going to make fluid + responsive typography so much better!
CSS text-wrap: balance; will evenly distribute your text on available lines.
489721411092K
2276
54936813K
Quality
Quality
🔥 Use CSS clamp() to make any property have min + max values.
Here I'm using it to stop a tooltip from running off the page.