πŸ”₯ There are 446 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.

πŸ”₯ Object Spread is really handy for overriding defaults

6821501622

πŸ”₯ iTunes opening when you hit the play button and Spotify isn’t open?

Rename the executable inside the package contents β†’

7661393228

πŸ”₯ Logos not lining up? Set a hard width + height, then use object-fit: contain; to un-stretch, perfectly center, and ensure nothing is cut off

40557416

πŸ”₯ You can stack CSS transforms of the same type if you are mixing units

1K2091730

πŸ”₯ The new Async clipboard API is so much simpler than the previous range select/document.execCommand() solutions.

It must be on a secure origin (https or localhost) and be tied to a real click

More info:

5191331217

πŸ”₯ Poor (wo)man’s object search - stringify the object and use String.includes to filter the array

16115128

πŸ”₯ The Array .some() Method is super handy for checking if at least one item in an array meets what you are looking for

553126816

πŸ”₯ If you are trying to align oddly sized images, set a hard width + height and then use object-fit: cover; to remove any distortion

img {
  width: 200px;
  height: 200px;
  object-fit: cover;
}
3.2K71349182

πŸ”₯ Quick Video: Heres how JavaScript's Nested Object Destructuring works

1333346

πŸ”₯ .toLocaleString() is a great way to format currency

2.4K6973614