<commit_before>@import "ui-variables";
@import "syntax-variables";

.styleguide {
  position: relative;
  overflow: auto;

  & > section {
    &.bordered {
      padding: @component-padding*2;
    }

    & :last-child {
      margin-bottom: 0;
    }

    &.collapsed {
      > .section-heading {
        display: block;
        margin: 0;
        color: @text-color;
      }
      > * {
        display: none
      }
    }
  }

  section .section-heading {
    cursor: pointer;
    font-weight: bold;
    font-size: 1.6em;
    color: @text-color-highlight;
    &:hover {
      color: @text-color-highlight;
    }
  }

  h2 {
    font-size: 1.5em;
    line-height: 1.2;
    margin: 1.75em 0 0 0;
    color: @text-color-highlight;
  }

  p {
    font-size: 1.2em;
    margin: .5em 0 1em 0;
  }

  section[data-name="styleguide"] {
    border-top: none;
  }

  .popover-list {
    position: relative;
  }

  .select-list, .popover-list {
    atom-text-editor[mini] { height: 27px; }
  }

  .tooltip {
    position: relative;
    opacity: 1;
    display: inline-block;
    margin-right: @component-padding;
  }

  .btn-collapse-all {
    position: absolute;
    right: @component-padding;
    top: @component-padding;
    z-index: 100;
  }
}

// Example -------------------------------

.example {
  @example-background: @base-background-color;

  display: flex;
  flex-wrap: wrap;
  // border: 1px solid @tool-panel-border-color;
  border-radius: @component-border-radius;
  padding: @component-padding / 2;

  .example-rendered,
  .example-code {
    position: relative;
    flex: 1 1 300px;
    min-width: 0;
    margin: @component-padding / 2;
    border-radius: @component-border-radius;
    border: 1px solid @tool-panel-border-color;
  }

  .example-rendered {
    padding: @component-padding;<commit_msg>Improve collapsing<commit_after>@import "ui-variables";
@import "syntax-variables";

@styleguide-spacing: @component-padding *1.5;
@styleguide-bg: darken(@base-background-color, 2%);

.styleguide {
  position: relative;
  overflow: auto;
  padding: 0;

  & > section {
    background-color: @styleguide-bg;
    &.bordered {
      border-top: none;
      padding: 0;
    }

    &:first-of-type {
      background-color: @base-background-color;
    }

    &:last-child {
      margin-bottom: 0;
    }

    &.collapsed {
      background-color: @base-background-color;
      > .section-heading {
        display: block;
        margin: 0;
        padding-bottom: @styleguide-spacing;
        color: @text-color;
        &:hover {
          color: @text-color-highlight;
          background-color: @background-color-highlight;
        }
        &:active {
          background-color: @base-background-color;
        }
      }
      > * {
        display: none
      }
    }
  }

  .section-heading.section-heading {
    padding: @styleguide-spacing @styleguide-spacing 0 @styleguide-spacing;
    cursor: pointer;
    font-weight: normal;
    font-size: 1.8em;
    color: @text-color-highlight;
  }

  h2 {
    font-size: 1.5em;
    line-height: 1.2;
    margin: 1.75em @styleguide-spacing 0 @styleguide-spacing;
    color: @text-color-highlight;
  }

  p {
    font-size: 1.2em;
    margin: .5em @styleguide-spacing 1em @styleguide-spacing;
  }

  .popover-list {
    position: relative;
  }

  .select-list, .popover-list {
    atom-text-editor[mini] { height: 27px; }
  }

  .tooltip {
    position: relative;
    opacity: 1;
    display: inline-block;
    margin-right: @component-padding;
  }

  .btn-collapse-all {
    position: absolute;
    right: @component-padding;
    top: @component-padding;
    z-index: 100;
  }
}

// Example -------------------------------

.example {
  @example-background: @base-background-color;

  display: flex;
  flex-wrap: wrap;
  border-radius: @component-border-radius;
  padding: @component-padding / 2;

  .example-rendered,
  .example-code {
    position: relative;
    flex: 1 1 300px;
    min-width: 0;
    margin: @component-padding / 2;
    border-radius: @component-border-radius;
    border: 1px solid @tool-panel-border-color;
  }

  .example-rendered {
    padding: @component-padding;
{'fraction_non_alphanumeric': 0.15354901014002897, 'fraction_numerical': 0.01834862385321101, 'mean_word_length': 2.186923076923077, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '3270576', 'n_tokens_mistral': 1526, 'n_tokens_neox': 1425, 'n_words': 275}