Taran Bains
TILBLOGABOUTUSES

TIL margin is meant to increase the distance between siblings. It is not meant to increase the gap between a child and its parent’s bounding box; that’s what padding is for.

width looks up the tree but height looks down the tree. An element’s width is calculated based on its parent’s size, but an element’s height is calculated based on its children.

Thanks Josh Comeau!

😆 while going through a CSS workshop, I came across this list of CSS mistakes. Be humble folks. We all mistakes.

Here’s a list (probably not complete) set of inheritable css properties.

TIL, from Dom Farolino that he’s trying to make addEventListener extinct with the observables api!

// Filtering and mapping:
element
  .on('click')
  .filter(e => e.target.matches('.foo'))
  .map(e => ({x: e.clientX, y: e.clientY}))
  .subscribe({next: handleClickAtPoint})

Check out this dope tool for understanding the React internals! So dope!

Never make a decision in anger, and never make a promise in happiness

-Imam Ali Ibn Abi Talib

TIL about an app that’ll edit your prose for you! Hemingway App should be able to help me write with better clarity and conciseness. I’m a wordy son of a gun.

08.05.2024js

patch-package

Got a node_module giving you a headache? Need to give it a band-aid? Thank your lucky stars for patch-package.

It’s a vital band-aid for the bleeding edge!

You must be willing to suffer the anger of your opponent, and yet not return anger. You must not become bitter. No matter how emotional your opponents are, you must be calm.

Anger is incompatible with joy.

Our goal is not to remain calm while suffering but rather to experience a setback without thereby suffering.

01.05.2024css

unset

TIL about the unset keyword in CSS; it resets the property value from the one it inherited from its parent and it it doesn’t natrually inherit from its parent, it sets it to its initial value.

Read More

30.04.2024js

bundlephobia

If you ever want to know (sort of) the cost of adding a package to your node app, you can use bundlephobia!

TIL that Kanak Di Rakhi is a Punjabi song that me and the Boys wild out to. It’s a banger. It came out in 1959 and is a must listen to and dance to at any reception.

how-to-find-and-replace-in-vim
"while in your quick list
:cdo s/your-search-term/thing-to-replace-with/g

"go to quick list after changes
:wa <CR>


During office hours with Kent, I learned about semver calculator!

It seems pretty dope and I’m going to use it in the future!

10.04.2024js

GROQ

I also learned that Sanity has their own query language for working with JSON. Might be worth looking into if you need to do some transformations and just move it into the query versus doing it in the code.

Read More

TIL about a sick template for building a headless shopify theme with Sanity and Hydrogen.

Read More

If you pass in a name, it’ll behave like an actual accordion. Thanks Adam Argyle!

Read More

14.03.2024js

trigger.dev

Need to run background jobs? Not writing Ruby On Rails and therefore not using Sidekiq? Check out trigger.dev

I can probably use this somewhere in the future but TBD 🤔!