Skip to main content

Matt Smith

  • About
  • Contact
Web Dev | Front-End Engineer | UX Designer

Leveraging “unknown” instead of “any”

1 min read
645 views

In TypeScript, you may have heard that the any type is seen as a kind of “get out of jail free” card. It allows any value to be assigned to a variable of type any, which effectively disabling TypeScript’s static type checking. That might be convenient in certain situations, but...

  • TypeScript

CSS fix for 100vh in mobile WebKit

1 min read
245836 views

Not long ago there was some buzz around how WebKit handles 100vh in CSS, essentially ignoring the bottom edge of the browser viewport. Some have suggested not using 100vh, others have come up with different alternatives to work around the problem. In fact, this issue goes further back a few...

  • CSS
  • HTML
  • mobile

Using closest() to return the correct DOM element

1 min read
25908 views

I was recently working with a vertical navigation component and ran into a hiccup where the JavaScript code wouldn’t fire depending on where I clicked on the menu item link. I did some digging and thought I’d share a little about what I discovered and how I was able to...

  • HTML
  • JavaScript
Older posts Newer posts
Twitter
LinkedIn
GitHub
CodePen
© 2025 Matt Smith. All rights reserved.