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 16 of 45
π₯ 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?
π₯ Forgot to add a file to your .gitignore?
.gitignore
Heres how to remove that file from your git repo after the fact
Yesterday I renamed a file from File.jpg β file.jpg, but it didn't trigger any changes in my git repo, which means I wasn't able to deploy it.
Had to use git mv to rename the file in my git repo as well.
git mv
Your language isnβt broken, itβs just doing floating point math!
π₯ CLI Bracket Expansion! Super handy when you need to create, install or rename multiple files in a single go.
touch store-{products,cart,coupons,utils}.js
Does Code Quality Matter Anymore?