๐Ÿ”ฅ There are 433 Hot Tips!!

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.

Amazing how easy it is to build menu bar apps with HTML, CSS and JS in electron!

Pommade: for checking your hair! My first app ever, and it took just over an hour.

Code here: https://github.com/wesbos/pommade

๐Ÿ”ฅ Use .valueAsNumber and .valueAsDate to get + set numbers and dates on your inputs.

Super handy in TypeScript because input.value always is a string

๐Ÿ”ฅ Here is how I use Caddy Server to get local HTTPS and a custom domain without port numbers.

Super simple!

964

๐Ÿ”ฅ Experimental JavaScript Eyedropper API is in Chrome! Pretty nice async API.

Hoping it will return more than just a hex string when finished.

๐Ÿ”ฅ Here is how I use Cloudflare workers to intercept and modify SASS requests to add my own custom endpoints, links and CSS

๐Ÿ”ฅ CSS object-fit: cover; is super handy for aligning images.

Works really well with CSS Grid image galleries too!

781

๐Ÿ”ฅ Use JavaScriptโ€™s new array.at():

.at(0) โ†’ first item

.at(-1) โ†’ last item

It also floors the index, which is handy for random items!

dogs.at(Math.random() * dogs.length)

Three CSS tips for working with inconsistently sized logos

File this under CSS you probably shouldn't write, but can:

p[style="text-align: center"] {
  text-align: left !important;
}

These AI based text-to-CLI commands are starting to pop up in lots of tools. Warp, Fig, Github Co-pilot + more

What do you think? Helpful? Or dumb idea to run commands from smart sand?