@include block ('code') {

  clear: both;
  display: block;

  &::after {
    clear: both;
    content: '';
    display: table;
  }

  & + & {
    border-top: $border-code $color-border;
    margin-top: s(2);
    padding-top: s(2);
  }

  @include element ('snippet') {
    font-family: $font-mono;
    margin-top: s(1);

    pre {
      font-family: inherit;
      margin: 0;
    }

    code {
      font-family: inherit;
      &::selection,
      span::selection {
        background-color: $color-code-selection-background;
        color: $color-code-selection-text;
      }
    }
  }
}
