Skip to main content

Matt Smith

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

Responsive video resizing

December 12, 2016
1 min read
59174 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

December 5, 2016
1 min read
16569 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

November 28, 2016
1 min read
4974 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
Newer posts Older posts
Twitter
LinkedIn
GitHub
CodePen
© 2025 Matt Smith. All rights reserved.