CSS: CSSだけで高さ不定フッターを最下部に固定する

CSSだけ(flexbox)で高さ不定フッターを最下部に固定する方法に書いてある。

<!DOCTYPE html>
<html>
<head>
  <style >
    .body {
      padding: 0;
      margin: 0;
      display: flex;
      flex-direction: column;
      min-height: 100vh;
    }
    header {
      background: red;
    }
    section {
      flex: 1;
      background: yellow;
    }
    footer {
      background: blue;
    }
  </style>
</head>
<body class="body">
  <header>
    site name.
  </header>
  <section>
    a few contents.
  </section>
  <footer>
    copyrights.
  </footer>
</body>
</html>


便利。

関連:
Pure CSS sticky footer with calc( vh ) - Qiita