Skip to main content

Matt Smith

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

Zero-based date, Christmas, and emoji

1 min read
1753 views

Here’s a quick tip if you’re starting out with JavaScript: which of the following values passed to the getMonth() and getDate() methods will print December 25? 11,24 11,25 12,25 If you answered 11,25, have some egg nog and an extra piece of ribbon candy, you’re doing awesome. Zero-based counting JavaScript...

  • JavaScript

Responsive video resizing

1 min read
59209 views

There are a number of options for implementing responsive images, e.g., the <picture> element, client-side polyfills, automatic cropping, et al. But what about video? Many of the examples I see in responsive layouts replace video with a static image in smaller viewports. That may be because of concerns regarding data...

  • CSS
  • mobile

Flexible type with :root

1 min read
16624 views

One element of responsive web design that can be tricky to solve for is typography. Ideally you want to have type that’s as fluid as possible across different viewports. A conventional way of doing this might be to start with a base font size and then change it when you...

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