Skip to main content

Matt Smith

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

Flexible type with :root

1 min read
16602 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

Use attribute selectors with empty links

1 min read
4998 views

Here’s a quick CSS tip: if a hyperlink doesn’t have a text value, i.e., it rendered empty, insert the href value in its place: a[href]:empty::before { content: attr(href); } Why do this? Link text can be overlooked in content generated by a CMS. Rendering the text with the href value...

  • CSS

Math.floor, Math.random, and Jurassic Park

1 min read
2553 views

In JavaScript, the Math object is something developers work with a lot. And two methods in particular, Math.floor() and Math.random(), are often utilized together. Let’s take a quick look at both to see how we might use them to create a random text engine. The Math.random() method generates a number...

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