@import './variable';

code {
  display: block;
  font-size: 13px;
  overflow-x: auto;
  font-weight: 400;
  line-height: 22px;
  border-radius: 6px;
  margin-bottom: 25px;
  position: relative;
  word-break: break-all;
  white-space: pre-wrap;
  background-color: #f5f7fa;
  color: $zan-doc-code-color;
  padding: 18px 10px 18px 20px;
  font-family: "Source Code Pro", "Monaco", "Inconsolata", monospace;

  &::after {
    top: 5px;
    right: 10px;
    position: absolute;
    color: #ccc;
    font-size: 12px;
  }
}

pre {
  margin: 0;

  + pre {
    margin-top: -10px;
  }
}

code.language-html {
  &::after {
    content: 'HTML';
  }
}

code.language-javascript {
  &::after {
    content: 'JS';
  }
}

code.language-css {
  &::after {
    content: 'CSS';
  }
}

.hljs {
  display: block;
  overflow-x: auto;
  padding: 0.5em;
  background: #fff;
}

.hljs-subst {
  color: $zan-doc-code-color;
}

.hljs-string,
.hljs-meta,
.hljs-symbol,
.hljs-template-tag,
.hljs-template-variable,
.hljs-addition {
  color: #756bb1;
}

.hljs-comment,
.hljs-quote {
  color: #999;
}

.hljs-number,
.hljs-regexp,
.hljs-literal,
.hljs-bullet,
.hljs-link {
  color: #31a354;
}

.hljs-deletion,
.hljs-variable {
  color: #88f;
}

.hljs-keyword,
.hljs-selector-tag,
.hljs-title,
.hljs-section,
.hljs-built_in,
.hljs-doctag,
.hljs-type,
.hljs-tag,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class,
.hljs-strong {
  color: #1976d2;
}

.hljs-emphasis {
  font-style: italic;
}

.hljs-attribute {
  color: #e6550d;
}
