<commit_before>@import "bootstrap/mixins";

// drop `factlink-` prefix when getting rid of Bootstrap popovers
.factlink-popover {
  position: relative;
  visibility: visible;
  display: inline-block;
  z-index: 1; // force new stacking context for arrow shadow

  .factlink-popover-content {
    display: inline-block;
    .background-clip(padding-box);
    background: white;
    border-radius: @baseBorderRadius;
    box-shadow: @blockBorder, 0 @factlinkPopoverShadowBottomSize 5px @factlinkPopoverShadowBottomColor;

    // some basic resets
    line-height: @baseLineHeight;
    text-align: left;
  }

  &.bottom {
    .factlink-popover-content {
      margin-top: @triangleSize;
    }
    .factlink-popover-arrow {
      .triangle-arrow-up(@factlinkPopoverArrowTopBorderColor);
      top: @triangleSize;
    }
  }

  &.top {
    .factlink-popover-content {
      margin-bottom: @triangleSize;
    }
    .factlink-popover-arrow {
      .triangle-arrow-down(@factlinkPopoverArrowBorderColor, @factlinkPopoverArrowBorderOffset);
      bottom: @triangleSize;
    }
  }

  &.left {
    .factlink-popover-content {
      margin-right: @triangleSize;
    }
    .factlink-popover-arrow {
      .triangle-arrow-right(@factlinkPopoverArrowBorderColor, @factlinkPopoverArrowBorderOffset);
      right: @triangleSize;
    }
  }

  &.right {
    .factlink-popover-content {
      margin-left: @triangleSize;
    }
    .factlink-popover-arrow {
      .triangle-arrow-left(@factlinkPopoverArrowBorderColor, @factlinkPopoverArrowBorderOffset);
      left: @triangleSize;
    }
  }
}

.translucent-popover {
  position: relative;
  visibility: visible;
  display: inline-block;

  .factlink-popover-content {
    background: @darkTranslucentGrey;
    color: white;
    display: inline-block;
    border-radius: 2px;
    padding: 9px 18px;
    text-align: center;
  }

  .factlink-popover-arrow {
    border: floor(@triangleSize) solid transparent;
    position: absolute;
    width: 2px;
    height: 2px;
    margin: -8px;
    .box-sizing(content-box);
  }

  &.top {
    .factlink-popover-content {
      margin-bottom: @triangleSize;
    }
    .factlink-popover-arrow {
      top: 100%;
      margin-top: -@triangleSize;
      border-bottom: none;
      border-top-color: @darkTranslucentGrey;
    }
  }
  &.right {
    .factlink-popover-content {
      margin-left: @triangleSize;
    }
    .factlink-popover-arrow {
      right: 100%;
      margin-right: -@triangleSize;
      border-left: none;
      border-right-color: @darkTranslucentGrey;
    }
  }
  &.bottom {
    .factlink-popover-content {
      margin-top: @triangleSize;
    }
    .factlink-popover-arrow {
      bottom: 100%;
      margin-bottom: -@triangleSize;
      border-top: none;
      border-bottom-color: @darkTranslucentGrey;
    }
  }
  &.left {
    .factlink-popover-content {
      margin-right: @triangleSize;
    }
    .factlink-popover-arrow {
      left: 100%;
      margin-left: -@triangleSize;
      border-right: none;
      border-left-color: @darkTranslucentGrey;
    }
  }
}

.translucent-grey-popover {
  .factlink-popover-content {
    background: @translucentGrey;
    color: @metaFontColor;
  }

  &.top .factlink-popover-arrow {
    border-top-color: @translucentGrey;
  }
  &.right .factlink-popover-arrow {
    border-right-color: @translucentGrey;
  }
  &.bottom .factlink-popover-arrow {
    border-bottom-color: @translucentGrey;
  }
  &.left .factlink-popover-arrow {
    border-left-color: @translucentGrey;
  }
}
<commit_msg>Allow nesting of popovers/tooltips<commit_after>@import "bootstrap/mixins";

// drop `factlink-` prefix when getting rid of Bootstrap popovers
.factlink-popover {
  position: relative;
  visibility: visible;
  display: inline-block;
  z-index: 1; // force new stacking context for arrow shadow

  > .factlink-popover-content {
    display: inline-block;
    .background-clip(padding-box);
    background: white;
    border-radius: @baseBorderRadius;
    box-shadow: @blockBorder, 0 @factlinkPopoverShadowBottomSize 5px @factlinkPopoverShadowBottomColor;

    // some basic resets
    line-height: @baseLineHeight;
    text-align: left;
  }

  &.bottom {
    > .factlink-popover-content {
      margin-top: @triangleSize;
    }
    > .factlink-popover-arrow {
      .triangle-arrow-up(@factlinkPopoverArrowTopBorderColor);
      top: @triangleSize;
    }
  }

  &.top {
    > .factlink-popover-content {
      margin-bottom: @triangleSize;
    }
    > .factlink-popover-arrow {
      .triangle-arrow-down(@factlinkPopoverArrowBorderColor, @factlinkPopoverArrowBorderOffset);
      bottom: @triangleSize;
    }
  }

  &.left {
    > .factlink-popover-content {
      margin-right: @triangleSize;
    }
    > .factlink-popover-arrow {
      .triangle-arrow-right(@factlinkPopoverArrowBorderColor, @factlinkPopoverArrowBorderOffset);
      right: @triangleSize;
    }
  }

  &.right {
    > .factlink-popover-content {
      margin-left: @triangleSize;
    }
    > .factlink-popover-arrow {
      .triangle-arrow-left(@factlinkPopoverArrowBorderColor, @factlinkPopoverArrowBorderOffset);
      left: @triangleSize;
    }
  }
}

.translucent-popover {
  position: relative;
  visibility: visible;
  display: inline-block;

  > .factlink-popover-content {
    background: @darkTranslucentGrey;
    color: white;
    display: inline-block;
    border-radius: 2px;
    padding: 9px 18px;
    text-align: center;
  }

  > .factlink-popover-arrow {
    border: floor(@triangleSize) solid transparent;
    position: absolute;
    width: 2px;
    height: 2px;
    margin: -8px;
    .box-sizing(content-box);
  }

  &.top {
    > .factlink-popover-content {
      margin-bottom: @triangleSize;
    }
    > .factlink-popover-arrow {
      top: 100%;
      margin-top: -@triangleSize;
      border-bottom: none;
      border-top-color: @darkTranslucentGrey;
    }
  }
  &.right {
    > .factlink-popover-content {
      margin-left: @triangleSize;
    }
    > .factlink-popover-arrow {
      right: 100%;
      margin-right: -@triangleSize;
      border-left: none;
      border-right-color: @darkTranslucentGrey;
    }
  }
  &.bottom {
    > .factlink-popover-content {
      margin-top: @triangleSize;
    }
    > .factlink-popover-arrow {
      bottom: 100%;
      margin-bottom: -@triangleSize;
      border-top: none;
      border-bottom-color: @darkTranslucentGrey;
    }
  }
  &.left {
    > .factlink-popover-content {
      margin-right: @triangleSize;
    }
    > .factlink-popover-arrow {
      left: 100%;
      margin-left: -@triangleSize;
      border-right: none;
      border-left-color: @darkTranslucentGrey;
    }
  }
}

.translucent-grey-popover {
  > .factlink-popover-content {
    background: @translucentGrey;
    color: @metaFontColor;
  }

  &.top > .factlink-popover-arrow {
    border-top-color: @translucentGrey;
  }
  &.right > .factlink-popover-arrow {
    border-right-color: @translucentGrey;
  }
  &.bottom > .factlink-popover-arrow {
    border-bottom-color: @translucentGrey;
  }
  &.left > .factlink-popover-arrow {
    border-left-color: @translucentGrey;
  }
}

{'fraction_non_alphanumeric': 0.12748274404845752, 'fraction_numerical': 0.0061980560642343994, 'mean_word_length': 2.699843668577384, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 27, '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': '6538813', 'n_tokens_mistral': 2533, 'n_tokens_neox': 2433, 'n_words': 387}