<commit_before>/*
  PANEL
  -----

  The friendly panel is an all-purpose container for hiding content off-screen.

  Features:
   - Position at top, right, bottom, or left
   - Anchor to grid block or window
   - Define max width or height
   - Transform into grid block depending on screen size
*/

$panel-size-horizontal: 300px !default;
$panel-size-vertical: 300px !default;
$panel-padding: 0 !default;

$panel-background: #fff !default;
$panel-shadow: 3px 0 10px rgba(black, 0.25) !default;
$panel-animation-speed: 0.25s !default;

%panel-base {
  display: block;
  position: absolute;
  z-index: 100;
  overflow-y: auto;
  display: none;

  &.is-active {
    display: block;
  }
}

@mixin panel-layout(
  $position: left,
  $size: default,
  $shadow: $panel-shadow
) {
  @if $size == default {
    @if $position == left or $position == right {
      $size: $panel-size-horizontal;
    }
    @if $position == top or $position == bottom {
      $size: $panel-size-vertical;
    }
  }

  /*
    Direction
  */
  @if $position == top {
    top: 0;
    left: 0;
    width: 100%;
  }
  @else if $position == right {
    top: 0;
    right: 0;
    height: 100%;
  }
  @else if $position == bottom {
    bottom: 0;
    left: 0;
    width: 100%;
  }
  @else if $position == left {
    top: 0;
    left: 0;
    height: 100%;
  }

  /*
    Sizing
  */
  // Horizontal panels are always all the way tall and have a set width
  @if $position == left or $position == right {
    @if unit($size) == '%' {
      width: $size;
    }
    @else {
      width: 100%;
      @include breakpoint($size) {
        width: $size;
      }
    }
  }
  // (For now) vertical panels don't change size
  @if $position == top or $position == bottom {
    height: $size;
  }

  /*
    Shadows
  */
  $shadow-distance: get-shadow-value($shadow, x);
  $shadow-size: get-shadow-value($shadow, size);
  $shadow-color: get-shadow-value($shadow, color);
  &.is-active {
    @if $position == left        { box-shadow: $shadow-distance 0 $shadow-size $shadow-color; }
    @else if $position == right  { box-shadow: -$shadow-distance 0 $shadow-size $shadow-color; }
    @else if $position == top    { box-shadow: 0 $shadow-distance $shadow-size $shadow-color; }
    @else if $position == bottom { box-shadow: 0 -$shadow-distance $shadow-size $shadow-color; }
  }
}

@mixin panel-style(
  $padding: $panel-padding,
  $background: $panel-background
) {
  /*
    Basic styles
  */
  padding: $padding;
  background: $background;<commit_msg>Fix erratic panel shadows, fixes #157<commit_after>/*
  PANEL
  -----

  The friendly panel is an all-purpose container for hiding content off-screen.

  Features:
   - Position at top, right, bottom, or left
   - Anchor to grid block or window
   - Define max width or height
   - Transform into grid block depending on screen size
*/

$panel-size-horizontal: 300px !default;
$panel-size-vertical: 300px !default;
$panel-padding: 0 !default;

$panel-background: #fff !default;
$panel-shadow: 3px 0 10px rgba(black, 0.25) !default;
$panel-animation-speed: 0.25s !default;

%panel-base {
  display: block;
  position: absolute;
  z-index: 100;
  overflow-y: auto;
  display: none;

  &.is-active {
    display: block;
  }
}

@mixin panel-layout(
  $position: left,
  $size: default,
  $shadow: $panel-shadow
) {
  @if $size == default {
    @if $position == left or $position == right {
      $size: $panel-size-horizontal;
    }
    @if $position == top or $position == bottom {
      $size: $panel-size-vertical;
    }
  }

  /*
    Direction
  */
  @if $position == top {
    top: 0;
    left: 0;
    width: 100%;
  }
  @else if $position == right {
    top: 0;
    right: 0;
    height: 100%;
  }
  @else if $position == bottom {
    bottom: 0;
    left: 0;
    width: 100%;
  }
  @else if $position == left {
    top: 0;
    left: 0;
    height: 100%;
  }

  /*
    Sizing
  */
  // Horizontal panels are always all the way tall and have a set width
  @if $position == left or $position == right {
    @if unit($size) == '%' {
      width: $size;
    }
    @else {
      width: 100%;
      @include breakpoint($size) {
        width: $size;
      }
    }
  }
  // (For now) vertical panels don't change size
  @if $position == top or $position == bottom {
    height: $size;
  }

  /*
    Shadows
  */
  $shadow-distance: get-shadow-value($shadow, x);
  $shadow-size: get-shadow-value($shadow, size);
  $shadow-color: get-shadow-value($shadow, color);
  &.is-active {
    @if $position == left        { box-shadow: $shadow-distance 0 $shadow-size $shadow-color; }
    @else if $position == right  { box-shadow: (-$shadow-distance) 0 $shadow-size $shadow-color; }
    @else if $position == top    { box-shadow: 0 $shadow-distance $shadow-size $shadow-color; }
    @else if $position == bottom { box-shadow: 2px (-$shadow-distance) $shadow-size $shadow-color; }
  }
}

@mixin panel-style(
  $padding: $panel-padding,
  $background: $panel-background
) {
  /*
    Basic styles
  */
  padding: $padding;
  background: $background;
{'fraction_non_alphanumeric': 0.15188866799204773, 'fraction_numerical': 0.019284294234592447, 'mean_word_length': 2.5987124463519313, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5028127', 'n_tokens_mistral': 1833, 'n_tokens_neox': 1712, 'n_words': 498}