<div class="absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2">
  <div class="grid grid-cols-2 justify-items-center">
    <div>
      <div class="button--alt">Button Alt.</div>
    </div>
    <div>
      <div class="button--outline">
        <div class="button">Button Out.</div>
      </div>
    </div>
  </div>
  <div class="paragraph--outline">
    <div class="paragraph">
      <h1 class="text-xl">Overflow Example</h1>
      Notice how the scrollbar and text contents don't clip outside this scrollable div.
      <h2 class="text-lg mt-4 mb-1">Lorem ipsum</h2>
      Consectetur adipiscing elit. Pellentesque finibus tempus mauris. Proin ac quam sapien. Cras maximus massa malesuada, pellentesque magna at, aliquam ligula. Sed luctus tincidunt lorem nec varius. Vivamus fringilla ligula quis nulla efficitur egestas. Fusce vestibulum risus nec maximus porta. Sed malesuada egestas sem, id vehicula sem facilisis vitae. Maecenas efficitur nunc risus, non imperdiet felis fringilla id.
      <br /><br />
      Sed hendrerit velit erat, a iaculis mauris placerat non. Phasellus vehicula elit justo, non sodales turpis egestas at. Aliquam et turpis auctor, tempus libero vitae, condimentum justo. Vivamus malesuada magna leo, sed dapibus velit blandit eget. Vestibulum luctus sapien pretium est congue pharetra. Sed non odio vitae urna condimentum scelerisque. In fringilla ante a ante efficitur consequat.
      <br /><br />
      Pellentesque mollis dolor quis neque rhoncus fermentum. Interdum et malesuada fames ac ante ipsum primis in faucibus. Mauris aliquet eget mi sit amet lobortis. Aenean viverra scelerisque arcu vitae porttitor. In hac habitasse platea dictumst. Fusce at facilisis ipsum. Morbi turpis magna, congue tincidunt metus at, ultrices blandit est. Ut fringilla diam lectus, ut ullamcorper lacus finibus id.
    </div>
  </div>
</div>
:root {
  color-scheme: dark;
}

// Janky approach to responsiveness since I can't change
// Tailwinds' break points on CodePen.
@media only screen and (min-width: 420px) {
  .grid {
    min-width: 28em;
  }
}

@media only screen and (max-width: 420px) {
  .grid-cols-2 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }

  .absolute {
    position: initial;
    transform: translate(0, 0);
  }
}

html,
body {
  height: 100%;
  background-color: black;
}

// https://css-tricks.com/notched-boxes/

/* 
 * @param $size   Bevel size.
 * @param $alt    Use alternate corners.
 */
@mixin bevel--opp($size: 12px, $alt: false) {
  @if $alt {
    clip-path: polygon(
      0% $size,
      $size 0%,
      100% 0%,
      100% 100%,
      100% calc(100% - #{$size}),
      calc(100% - #{$size}) 100%,
      100% 100%,
      0% 100%
    );
  } @else {
    clip-path: polygon(
      0% 0%,
      0% 0%,
      calc(100% - #{$size}) 0%,
      100% $size,
      100% 100%,
      100% 100%,
      $size 100%,
      0 calc(100% - #{$size})
    );
  }
}

/* 
 * @param $size   Bevel size.
 */
@mixin bevel--full($size: 12px) {
  clip-path: polygon(
    0% $size,
    $size 0%,
    calc(100% - #{$size}) 0%,
    100% $size,
    100% calc(100% - #{$size}),
    calc(100% - #{$size}) 100%,
    $size 100%,
    0 calc(100% - #{$size})
  );
}

.button {
  cursor: pointer;
  white-space: nowrap;

  color: white;
  background-color: #0070f3;
  transition: background-color 200ms;

  display: inline-block;
  text-align: center;
  width: 12em;

  padding: 1em;
  margin: 1em;

  &:hover {
    background-color: #3291ff;
  }

  @include bevel--opp();

  &--alt {
    @extend .button;
    @include bevel--opp($alt: true);
  }

  &--outline {
    @extend .button;
    background-color: #374151;
    padding: 0;

    .button {
      background-color: black;
      color: #9ca3af;

      // Offset for bottom and right borders.
      margin: 1px;
      width: calc(100% - 2px);
      padding: calc(1em - 1px) 1em;
    }
  }
}

.paragraph {
  color: #9ca3af;
  background-color: black;
  overflow-y: scroll;
  @include bevel--full($size: 1.5em);

  &--outline {
    @extend .paragraph;
    background-color: #374151;

    height: 300px;
    margin: 1em;
    overflow: hidden;

    .paragraph {
      position: relative;
      padding: 1em;

      width: calc(100% - 2px);
      height: calc(100% - 2px);
      top: 1px;
      left: 1px;
    }
  }
}
View Compiled

External CSS

  1. https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/2.2.4/tailwind.min.css

External JavaScript

This Pen doesn't use any external JavaScript resources.