<commit_before>/*!
 * Randomized | © <NAME> | MIT
 */

 // variables for standalone version
 // @link-color: #a212d1;
 // @code-color: #00cc80;

// Calculate code background color based on the lightness of link color
.calc-bg (@v) when (lightness(@v) >= 80%) {
  @calc-bg: mix(#fff, @v, 90%);
}

.calc-bg (@v) when (lightness(@v) < 80%) {
  @calc-bg: mix(#000, @v, 70%);
}

.highlight {

  // Reset background
  // .highlight > pre for common liquid method
  // .highlighter-rouge .highlight for GFM method
  // Ref: https://github.com/jekyll/jekyll/pull/4053
  @highlighter-tint: @link-color;
  > pre,
  .highlighter-rouge & {
    .calc-bg(@highlighter-tint);
    background: fade(@calc-bg, 2%);
  }

  // Reset default `code`
  code { color: desaturate(@link-color, 95%); } // Normal code

  // Special background for syntax errors
  .err { background-color: fade(saturate(@highlighter-tint, 10%), 10%) } // Error

  .c   { font-style: italic } // Comment
  .cm  { font-style: italic } // Comment.Multiline
  .cp  { font-weight: bold } // Comment.Preproc
  .c1  { font-style: italic } // Comment.Single
  .cs  { font-weight: bold; font-style: italic } // Comment.Special

  .nc  { font-weight: bold } // Name.Class
  .ne  { font-weight: bold } // Name.Exception
  .nf  { font-weight: bold } // Name.Function

  .o   { font-weight: bold } // Operator
  .ow  { font-weight: bold } // Operator.Word

  .gs  { font-weight: bold } // Generic.Strong
  .ge  { font-style: italic } // Generic.Emph

  .k   { font-weight: bold } // Keyword
  .kt  { font-weight: bold } // Keyword.Type
  .kc  { font-weight: bold } // Keyword.Constant
  .kd  { font-weight: bold } // Keyword.Declaration
  .kp  { font-weight: bold } // Keyword.Pseudo
  .kr  { font-weight: bold } // Keyword.Reserved

  @token-main:
    err // Error
    x // Other

    n // Name
    na // Name.Attribute
    nb // Name.Builtin
    bp // Name.Builtin.Pseudo
    nc // Name.Class
    no // Name.Constant
    nd // Name.Decorator
    ni // Name.Entity
    ne // Name.Exception
    nf // Name.Function
    nl // Name.Label
    nn // Name.Namespace
    nx // Name.Other
    nt // Name.Tag
    nv // Name.Variable
    vc // Name.Variable.Class
    vg // Name.Variable.Global
    vi // Name.Variable.Instance

    g // Generic
    gd // Generic.Deleted
    ge // Generic.Emph
    gr // Generic.Error
    gh // Generic.Heading
    gi // Generic.Inserted
    go // Generic.Output
    gp // Generic.Prompt
    gs // Generic.Strong
    gu // Generic.Subheading
    gt // Generic.Traceback
    gl // Generic.Lineno

    k // Keyword
    kc // Keyword.Constant
    kd // Keyword.Declaration
    kn // Keyword.Namespace
    kp // Keyword.Pseudo
    kr // Keyword.Reserved
    kt // Keyword.Type
    kv // Keyword.Variable

    w // Text.Whitespace

    l // Literal

    ld // Literal.Date

    s // Literal.String
    sb // Literal.String.Backtick
    sc // Literal.String.Char
    sd // Literal.String.Doc
    s2 // Literal.String.Double
    se // Literal.String.Escape
    sh // Literal.String.Heredoc
    si // Literal.String.Interpol
    sx // Literal.String.Other
    sr // Literal.String.Regex
    s1 // Literal.String.Single
    ss // Literal.String.Symbol

    m // Literal.Number
    mf // Literal.Number.Float
    mh // Literal.Number.Hex
    mi // Literal.Number.Integer
    il // Literal.Number.Integer.Long
    mo // Literal.Number.Oct
    mb // Literal.Number.Bin
    mx // Literal.Number.Other

    o // Operator
    ow // Operator.Word

    p // Punctuation
    pi // Punctuation.Indicator
  ;

  // Generate main highlights
  // Ref: https://github.com/less/less.js/issues/2071
  .loop-main (@i) when (@i < (length(@token-main) + 1)) {
    @token: extract(@token-main, @i);

    .@{token} {
      color: mix(spin(@code-color, (@i * 360 / length(@token-main))), @link-color, 80%);
    }
    .loop-main((@i + 1));
  }
  .loop-main(1);

  @token-comments:
    c // Comment
    cd // Comment.Multiline
    cm // Comment.Multiline
    cp // Comment.Preproc
    c1 // Comment.Single
    cs // Comment.Special
  ;

  // Generate highlight for comments
  .loop-comments (@i) when (@i < (length(@token-comments) + 1)) {
    @token: extract(@token-comments, @i);

    .@{token} {
      color: mix(desaturate(spin(@code-color, (@i * 360 / length(@token-comments))), 70%), @link-color, 90%);
      opacity: .6;
    }
    .loop-comments((@i + 1));
  }
  .loop-comments(1);

  // Reset code blocks appearance with line numbers
  table {

    &,
    th,
    td,
    td pre {
      padding: 0;
      margin: 0;
      border: none;
      background: transparent;
      font-size: 100%;
    }

    .lineno {
      color: desaturate(@link-color, 95%);
      opacity: .5;
      user-select: none;
    }

    .code {
      padding-left: 1em;
    }
  }
}
<commit_msg>fix(styles): "double" scroller issue on some platforms with codeblocks<commit_after>/*!
 * Randomized | © <NAME> | MIT
 */

 // variables for standalone version
 // @link-color: #a212d1;
 // @code-color: #00cc80;

// Calculate code background color based on the lightness of link color
.calc-bg (@v) when (lightness(@v) >= 80%) {
  @calc-bg: mix(#fff, @v, 90%);
}

.calc-bg (@v) when (lightness(@v) < 80%) {
  @calc-bg: mix(#000, @v, 70%);
}

.highlight {

  // Reset background
  // .highlight > pre for common liquid method
  // .highlighter-rouge .highlight for GFM method
  // Ref: https://github.com/jekyll/jekyll/pull/4053
  @highlighter-tint: @link-color;
  > pre,
  .highlighter-rouge & {
    .calc-bg(@highlighter-tint);
    background: fade(@calc-bg, 2%);
  }

  // Reset default `code`
  code { color: desaturate(@link-color, 95%); } // Normal code

  // Special background for syntax errors
  .err { background-color: fade(saturate(@highlighter-tint, 10%), 10%) } // Error

  .c   { font-style: italic } // Comment
  .cm  { font-style: italic } // Comment.Multiline
  .cp  { font-weight: bold } // Comment.Preproc
  .c1  { font-style: italic } // Comment.Single
  .cs  { font-weight: bold; font-style: italic } // Comment.Special

  .nc  { font-weight: bold } // Name.Class
  .ne  { font-weight: bold } // Name.Exception
  .nf  { font-weight: bold } // Name.Function

  .o   { font-weight: bold } // Operator
  .ow  { font-weight: bold } // Operator.Word

  .gs  { font-weight: bold } // Generic.Strong
  .ge  { font-style: italic } // Generic.Emph

  .k   { font-weight: bold } // Keyword
  .kt  { font-weight: bold } // Keyword.Type
  .kc  { font-weight: bold } // Keyword.Constant
  .kd  { font-weight: bold } // Keyword.Declaration
  .kp  { font-weight: bold } // Keyword.Pseudo
  .kr  { font-weight: bold } // Keyword.Reserved

  @token-main:
    err // Error
    x // Other

    n // Name
    na // Name.Attribute
    nb // Name.Builtin
    bp // Name.Builtin.Pseudo
    nc // Name.Class
    no // Name.Constant
    nd // Name.Decorator
    ni // Name.Entity
    ne // Name.Exception
    nf // Name.Function
    nl // Name.Label
    nn // Name.Namespace
    nx // Name.Other
    nt // Name.Tag
    nv // Name.Variable
    vc // Name.Variable.Class
    vg // Name.Variable.Global
    vi // Name.Variable.Instance

    g // Generic
    gd // Generic.Deleted
    ge // Generic.Emph
    gr // Generic.Error
    gh // Generic.Heading
    gi // Generic.Inserted
    go // Generic.Output
    gp // Generic.Prompt
    gs // Generic.Strong
    gu // Generic.Subheading
    gt // Generic.Traceback
    gl // Generic.Lineno

    k // Keyword
    kc // Keyword.Constant
    kd // Keyword.Declaration
    kn // Keyword.Namespace
    kp // Keyword.Pseudo
    kr // Keyword.Reserved
    kt // Keyword.Type
    kv // Keyword.Variable

    w // Text.Whitespace

    l // Literal

    ld // Literal.Date

    s // Literal.String
    sb // Literal.String.Backtick
    sc // Literal.String.Char
    sd // Literal.String.Doc
    s2 // Literal.String.Double
    se // Literal.String.Escape
    sh // Literal.String.Heredoc
    si // Literal.String.Interpol
    sx // Literal.String.Other
    sr // Literal.String.Regex
    s1 // Literal.String.Single
    ss // Literal.String.Symbol

    m // Literal.Number
    mf // Literal.Number.Float
    mh // Literal.Number.Hex
    mi // Literal.Number.Integer
    il // Literal.Number.Integer.Long
    mo // Literal.Number.Oct
    mb // Literal.Number.Bin
    mx // Literal.Number.Other

    o // Operator
    ow // Operator.Word

    p // Punctuation
    pi // Punctuation.Indicator
  ;

  // Generate main highlights
  // Ref: https://github.com/less/less.js/issues/2071
  .loop-main (@i) when (@i < (length(@token-main) + 1)) {
    @token: extract(@token-main, @i);

    .@{token} {
      color: mix(spin(@code-color, (@i * 360 / length(@token-main))), @link-color, 80%);
    }
    .loop-main((@i + 1));
  }
  .loop-main(1);

  @token-comments:
    c // Comment
    cd // Comment.Multiline
    cm // Comment.Multiline
    cp // Comment.Preproc
    c1 // Comment.Single
    cs // Comment.Special
  ;

  // Generate highlight for comments
  .loop-comments (@i) when (@i < (length(@token-comments) + 1)) {
    @token: extract(@token-comments, @i);

    .@{token} {
      color: mix(desaturate(spin(@code-color, (@i * 360 / length(@token-comments))), 70%), @link-color, 90%);
      opacity: .6;
    }
    .loop-comments((@i + 1));
  }
  .loop-comments(1);

  // Reset code blocks appearance with line numbers
  table {

    &,
    th,
    td,
    td pre {
      padding: 0;
      margin: 0;
      border: none;
      background: transparent;
      font-size: 100%;
    }

    // Rouge generated codeblocks with `lineno` will nest `pre` inside an
    // outter `pre`, this could help prevent "double" scroller issue on some
    // platforms
    pre {
      overflow-x: visible;
    }

    .gutter {

      // Reset theme-specific table styles
      &:first-child,
      &:last-child {
        padding: 0 !important;
      }

      .lineno {
        color: desaturate(@link-color, 95%);
        opacity: .5;
        user-select: none;
      }
    }

    .code {
      padding-left: 1em;
    }
  }
}

{'fraction_non_alphanumeric': 0.15645852006772235, 'fraction_numerical': 0.013245692660093617, 'mean_word_length': 1.9815914489311164, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 4, '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': '6068970', 'n_tokens_mistral': 3644, 'n_tokens_neox': 3390, 'n_words': 829}