// _components.scss
/* ============================================================================
COMPONENTS
-------------------------------------------------------------------------------
Reusable components for use across my site
============================================================================ */

// A component providing default styles for Markdown content
.markup {
  word-wrap: break-word;
  line-height: 1.7;
  padding: 0;

  > {
    :first-child {
      margin-top: 0;
    }
    :last-child {
      margin-bottom: 0;
    }
  }

  p,
  blockquote,
  ul,
  ol,
  dl,
  table,
  pre {
    margin: 1em 0;
  }

  ul,
  ol {
    list-style-type: revert;
    padding-left: 30px;
  }

  h1 {
    font-size: 2.5em;
  }

  h2 {
    font-size: 2em;
  }

  h3 {
    font-size: 1.5em;
  }

  h4 {
    font-size: 1.2em;
  }

  h5 {
    font-size: 1em;
  }

  h6 {
    font-size: 1em;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    margin: 0.5em 0 0.25em 0;
  }

  h1 + p,
  h2 + p,
  h3 + p {
    margin-top: 0.5em;
  }

  img {
    max-width: 100%;
  }

  code,
  pre {
    background-color: #f8f8f8;
    border-radius: 3px;
    border: 1px solid #ddd;
    font-family: monospace;
    font-size: 12px;
    margin: 0 2px;
    padding: 0 5px;
    white-space: pre;
  }

  pre code {
    border: none;
    margin: 0;
    padding: 0;
    white-space: pre;
  }
}
