calc() lets you do some real CSS magic

Kevin Powell on YouTubeWatch on YouTube

SaveMark complete

Sign in to save videos and track what you’ve finished.

IntermediateUI12 min

About this video

Kevin Powell shows how CSS calc() can do more than simple arithmetic, comparing it with math in a preprocessor and demonstrating several layout uses, such as breaking out of a container with viewport units. It is aimed at people who already write CSS.

What you’ll learn

  • Use calc() to combine units like viewport and pixel values in CSS
  • Compare runtime CSS math with preprocessor math in Sass
  • Apply calc() to break an element out of its container