git.s-ol.nu mmm / 3c79e69 scss / _content.scss
3c79e69

Tree @3c79e69 (Download .tar.gz)

_content.scss @3c79e69raw · history · blame

.content {
  img, video {
    width: inherit;
    height: inherit;
  }

  .markdown {
    max-width: 640px;
    position: relative;
  }

  .markdown,
  .markdown > p,
  .markdown > p > a {
    p, a {
      max-width: 100%;
    }

    > img, > video {
      display: block;
      max-width: 100%;
      max-height: 50vh;

      padding: 0 2em;
      box-sizing: border-box;
    }
  }

  .embed {
    display: block;
    width: inherit;
    height: inherit;
    max-width: inherit;

    .description {
      text-align: center;
    }

    &.inline {
      display: inline-block;
    }

    &.desc {
      display: inline-block;
      padding: 0.5em;
      margin: 0.2em;
      background: $gray-bright;
    }

    > *:not(.description) {
      max-width: 100%;
    }
  }

  pre > code {
    @include left-border;
    border-color: $gray-dark;

    display: block;
    border-radius: 6px;
    margin: 0 var(--margin-wide);
    padding: 1em;
    white-space: pre-wrap;
    overflow-x: auto;

    background: #1d1f21;
    color: #c5c8c6;
  }

  pre.dual-code {
    display: flex;
    justify-content: space-between;
    padding: 0 2rem;

    > code {
      @include right-border(0.3rem);

      flex: 1;
      margin: 0;
    }

    > code + code {
      @include left-border(0.3rem);
    }
  }

  .example, .well {
    @include left-border;

    margin: 1rem var(--margin-wide);
    padding: 1rem;
    background: $gray-bright;
    border-color: $gray-neutral;
  }
}