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.
Page 14 of 44
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.
.valueAsNumber
.valueAsDate
Super handy in TypeScript because input.value always is a string
input.value
๐ฅ Here is how I use Caddy Server to get local HTTPS and a custom domain without port numbers.
Super simple!
๐ฅ 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.
object-fit: cover;
Works really well with CSS Grid image galleries too!
๐ฅ Use JavaScriptโs new array.at():
array.at()
.at(0) โ first item
.at(0)
.at(-1) โ last item
.at(-1)
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?