<commit_before>@import (reference) '../style/variables.less';

.@{prefix}-code-block {
  //position: relative;
  font-size: 13px;
  & > .prism-code {
    font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas,
      'Liberation Mono', monospace;
  }
  background-color: @c-light-bg;

  [data-prefers-color='dark'] & {
    color: @c-text-dark;
    background: #262626;
  }

  & + &,
  & + table {
    margin-top: 16px;
  }

  > pre[class*='language-'] {
    margin: 0;
    background: transparent;

    .token-line:not(:last-child) .plain:empty {
      display: inline-block;
      min-height: 1em;
    }
  }

  &-copy-btn {
    position: absolute;
    top: 1.1em;
    right: 1em;
    display: inline-block;
    width: 16px;
    height: 16px;
    padding: 0;
    border: 0;
    outline: none;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s, background 0.2s;

    &:hover {
      opacity: 0.8;
    }

    &:active {
      opacity: 0.9;
    }

    &[data-status='ready'] {
      background-position: -54px 0;
    }

    &[data-status='copied'] {
      opacity: 1;
      pointer-events: none;
      background-position: -54px -16px;
    }
  }

  &:not(:hover) &-copy-btn {
    visibility: hidden;
    opacity: 0;
  }
}

code[class*='language-'],
pre[class*='language-'] {
  &::selection,
  & ::selection {
    color: inherit;
  }
}

[data-prefers-color='dark'] {
  code[class*='language-'],
  pre[class*='language-'] {
    color: @c-text-dark;
    text-shadow: 0 1px #000;

    &::selection,
    & ::selection {
      background-color: #364a63;
    }
  }
  .token.operator,
  .token.entity,
  .token.url,
  .language-css .token.string,
  .style .token.string {
    background: transparent;
  }
  .token.property,
  .token.tag,
  .token.constant,
  .token.symbol,
  .token.deleted {
    color: #f92672;
  }
  .token.selector,
  .token.attr-name,
  .token.string,
  .token.char,
  .token.builtin,
  .token.inserted {
    color: #a6e22e;
  }
  .token.atrule,
  .token.attr-value,
  .token.keyword {
    color: #e6db74;
  }
  .token.punctuation {
    color: @c-text-dark;
  }
  .token.keyword {
    color: #66d9ef;
  }
  .token.boolean,
  .token.number {
    color: #ae81ff;
  }
}
<commit_msg>doc: update code block style<commit_after>@import (reference) '../style/variables.less';

.@{prefix}-code-block {
  //position: relative;
  font-size: 13px;
  & > .prism-code {
    font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas,
      'Liberation Mono', monospace;
  }
  background-color: @c-light-bg;
  border-radius: 12px;
  overflow: hidden;
  box-sizing: border-box;

  [data-prefers-color='dark'] & {
    color: @c-text-dark;
    background: #262626;
  }

  & + &,
  & + table {
    margin-top: 16px;
  }

  > pre[class*='language-'] {
    margin: 0;
    background: transparent;

    .token-line:not(:last-child) .plain:empty {
      display: inline-block;
      min-height: 1em;
    }
  }

  &-copy-btn {
    position: absolute;
    top: 1.1em;
    right: 1em;
    display: inline-block;
    width: 16px;
    height: 16px;
    padding: 0;
    border: 0;
    outline: none;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s, background 0.2s;

    &:hover {
      opacity: 0.8;
    }

    &:active {
      opacity: 0.9;
    }

    &[data-status='ready'] {
      background-position: -54px 0;
    }

    &[data-status='copied'] {
      opacity: 1;
      pointer-events: none;
      background-position: -54px -16px;
    }
  }

  &:not(:hover) &-copy-btn {
    visibility: hidden;
    opacity: 0;
  }
}

code[class*='language-'],
pre[class*='language-'] {
  &::selection,
  & ::selection {
    color: inherit;
  }
}

[data-prefers-color='dark'] {
  code[class*='language-'],
  pre[class*='language-'] {
    color: @c-text-dark;
    text-shadow: 0 1px #000;

    &::selection,
    & ::selection {
      background-color: #364a63;
    }
  }
  .token.operator,
  .token.entity,
  .token.url,
  .language-css .token.string,
  .style .token.string {
    background: transparent;
  }
  .token.property,
  .token.tag,
  .token.constant,
  .token.symbol,
  .token.deleted {
    color: #f92672;
  }
  .token.selector,
  .token.attr-name,
  .token.string,
  .token.char,
  .token.builtin,
  .token.inserted {
    color: #a6e22e;
  }
  .token.atrule,
  .token.attr-value,
  .token.keyword {
    color: #e6db74;
  }
  .token.punctuation {
    color: @c-text-dark;
  }
  .token.keyword {
    color: #66d9ef;
  }
  .token.boolean,
  .token.number {
    color: #ae81ff;
  }
}

{'fraction_non_alphanumeric': 0.17454706142288998, 'fraction_numerical': 0.029606716747680072, 'mean_word_length': 2.31891495601173, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '506605', 'n_tokens_mistral': 1874, 'n_tokens_neox': 1765, 'n_words': 310}