🔥 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.

AI based emotion detection for video thunbnails

Running Promises concurrently - but not too many at once!

p-map is a nice balance between Promise.all() and sequential await when working with compute heavy functions.

435401418838K
40616
493143813K

Love the use of mix-blend-mode: difference; on the site logo for this striped t-shirt

1K631229364K

I did it! Gutted an old iPad 3, and stuck a $20 driver board to turn the high resolution display into an external monitor. Pretty fun project!

7893533182116K

Here are 10 hot tips for using CSS :has() 👉🏻

1: CSS :has() Basics Select an element based on its children. Handy when you want to style a parent differently when it contains media.

2: The anywhere selector! When The body has a checkbox checked, you can grab literally any other element in the body and style it. Useful for toggling settings without JS.

3: The Previous Element Selector! Grab the item before the selected item. Never before (heh) possible!

4: Layout Targeting! I use this in my slide decks. Based on the contents of the slide, I can create a few commonly used layouts.

Adding or removing elements will automatically change the layout.

  1. Form Validation Styling. Style the label, fieldset or wrapping element based on the validation of the input.

You can pair this with the previous element selector as well if your label and inputs are siblings.

  1. All Siblings! When you are hovering a child, select all the siblings, but not the hovered one. Useful if you want to focus or scale up an element while dimming the rest. Works well table rows too!

  2. Quantity Queries. When a parent has more than 5 children, style it differently.

Perhaps you want to add CSS mask and fade out the rest of the items.

  1. Empty Children Select the parent when it's children are empty.

Maybe you want to show skeleton loaders, or flag an element for debugging?

  1. Nested dropdown navs. Add a ↓ when there is a dropdown available.

  2. Attribute Selectors! Style the parent based on it's child file type!

30
3K571422K299K

auto-growing <textarea> without JavaScript!

CSS is getting field-sizing: content; to size inputs by their contents.

Dropped in Chrome Canary today, demo here:

2K26433766203K
1.2K24
2.5K1635644K

Suuuper handy new CSS:

:user-invalid and :user-valid pseudo selectors let you style inputs only once they have been interacted with

Just landed in Chrome + Safari, been in Firefox for years.

2.1K35721907177K

Finally! In VS Code, you can now tear off tabs and open the terminal in a new window.

This dropped in the latest VS Code update, along with native copy + paste files.

2K23352271177K

AI Experiment: Ricky from Trailer Park Boys and Tim Cook describe my appearance

WebcamGPT4 VisionEleven labs Custom Voice AI

553451416K
27718
8157437236118K

AI voice changes gonna be good removing or adding accents?!

87274.4K
22312204640K