@import 'common';
@mixin markdown {
  line-height: normal;
  > * {
    font-size: inherit;
  }
  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    margin-block-start: 1em;
    margin-block-end: 0.75em;
    @include semi-bold();
    color: inherit;
  }
  ul,
  ul li {
    list-style: disc;
    font-size: inherit;
  }
  ol,
  ol li {
    list-style: decimal;
    font-size: inherit;
  }
  ul,
  ol {
    padding-left: 16px;
    margin: 0;
    li {
      line-height: 1.75;
    }
  }
  p {
    margin: 0;
  }
  details {
    line-height: 1.75;
    summary {
      cursor: pointer;
      margin: 4px 0;
    }
  }
  > p {
    line-height: 1.75;
  }
  p + p {
    margin-top: 8px;
  }
  pre {
    white-space: pre-wrap;
  }
  code {
    display: inline-block;
    padding: 0 4px;
    margin: 1px 2px;
    border-radius: 4px;
    background-color: #8882;
    line-height: normal;
  }
  kbd {
    font-family: monospace;
    border: 1px solid #ccc;
    display: inline-block;
    border-radius: 4px;
    padding: 0 4px;
    margin: 1px 2px;
    line-height: 1.1;
    body.dark & {
      border-color: #666;
    }
  }
  blockquote {
    border-radius: 4px;
    margin: 0;
    padding: 4px;
    padding-left: 12px;
    color: inherit;
    background-color: #8881;
    box-sizing: border-box;
    position: relative;
    // @include text-color();
    body.dark & * {
      // 需要覆盖夜间模式
      color: inherit !important;
    }
    &::before {
      content: '';
      position: absolute;
      display: block;
      width: 3px;
      height: calc(100% - 8px);
      top: 4px;
      left: 0;
      border-radius: 2px;
      background-color: var(--theme-color);
    }
  }
  a,
  a:focus-within,
  a:hover {
    color: var(--theme-color);
  }
  > :last-child {
    margin-bottom: 0;
  }
}
