markdown-css

来源:互联网 发布:非诚勿扰php程序员 编辑:程序博客网 时间:2024/06/15 22:52
容器的类为epm-md-print,可自行修改
.epm-md-print {
  p,
  ol,
  ul,
  pre,
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  table,
  blockquote {
    margin-bottom1em
  }
  & blockquote>:first-child {
    margin-top0;
  }

  & blockquote>:last-child {
    margin-bottom0;
  }
  h1 {
    font-size32px;
    font-weight600;
  }

  h2 {
    font-size24px;
    font-weight600;
  }

  h3 {
    font-size20px;
    font-weight600;
  }

  h4 {
    font-size16px;
    font-weight600;
  }

  h5 {
    font-size14px;
    font-weight600;
  }

  h6 {
    font-size12px;
    font-weight600;
  }
  img {
    max-width100%;
    widthinherit;
    background-color#fff;
  }
  pre {
    border-width0;
    padding10px 15px;
    backgroundrgba(102,128,153,.1);
    line-height26px;
    code {
      backgroundnone
    }
  }
  a {
    color#0366d6;
    text-decorationnone;
  }
  a:hover {
    colorinherit;
    cursorpointer;
  }
  code {
    padding4px;
    font-size80%;
    colorinherit;
    backgroundrgba(102,128,153,.1);
    word-wrapbreak-word;
  }
  blockquote {
    padding10px 15px;
    color#777;
    border-left4px solid #999;
    backgroundrgba(102,128,153,.1);
  }
  ol {
      list-style-typedecimal;
  }
  ul {
      list-style-typedisc;
  }
  ol,
  ul {
    padding-left30px;
  }
  li>p {
    margin-top16px;
  }
  li+li {
    margin-top0.25em;
  }
  table {
    displayblock;
    width100%;
    overflowauto;
    border-spacing0;
    border-collapsecollapse;
  }

  table th {
    font-weight600;
  }

  table th,
  table td {
    padding6px 13px;
    border1px solid #dfe2e5;
  }

  table tr {
    background-color#fff;
    border-top1px solid #c6cbd1;
  }

  table tr:nth-child(2n) {
    background-color#f6f8fa;
  }
  dl {
    padding0;
  }

  dl dt {
    padding0;
    margin-top16px;
    font-size1em;
    font-styleitalic;
    font-weight600;
  }

  dl dd {
    padding0 16px;
    margin-bottom16px;
  }
  hr {
    border0;
    border-bottom1px solid #ddd;
    padding0;
    margin24px 0;
  }
  &>*:first-child {
    margin-top0 !important;
  }

  &>*:last-child {
    margin-bottom0 !important;
  }
}

1 0