Sha256: ba1f7dac6efd88f40de80f5b8bcd1429b6b10d34dcd72910056cba0d182dd61a

Contents?: true

Size: 1.52 KB

Versions: 517

Compression:

Stored size: 1.52 KB

Contents

@import "../tokens/colors";
@import "../tokens/spacing";

$overlay_sizes: (
  full: 100%,
  xxs: $space_xxs,
  xs: $space_xs,
  sm: $space_sm,
  md: $space_md,
  lg: $space_lg,
  xl: $space_xl,
);

$overlay_positions: left, right, top, bottom, x, y;

$overlay_colors: (
  card_light: $card_light,
  card_dark: $card_dark,
  bg_dark: $bg_dark,
  bg_light: $bg_light,
);

@mixin overlay($direction, $size, $color) {
  display: block;
  position: absolute;
  pointer-events: none;
  z-index: 1;
  content: "";

  @if $direction == "left" {
    inset: 0 auto 0 0;
    background: linear-gradient(to right, $color 0%, transparent 100%);
    width: $size;
  }
  @if $direction == "right" {
    inset: 0 0 0 auto;
    background: linear-gradient(to left, $color 0%, transparent 100%);
    width: $size;
  }
  @if $direction == "top" {
    inset: 0 0 auto 0;
    background: linear-gradient(to bottom, $color 0%, transparent 100%);
    height: $size;
  }
  @if $direction == "bottom" {
    inset: auto 0 0 0;
    background: linear-gradient(to top, $color 0%, transparent 100%);
    height: $size;
  }
}

[class^=pb_overlay] {
  position: relative;
  @each $color_name, $color in $overlay_colors {
    .overlay_#{$color_name} {
      @each $name, $size in $overlay_sizes {
        @each $position in $overlay_positions {
          &_#{$position}_#{$name} {
            @include overlay($position, $size, $color);
          }
        }
      }
    }
  }

  .overlay_linear_gradient {
    inset: 0;
    position: absolute;
    pointer-events: none;
    z-index: 1;
  }
}

Version data entries

517 entries across 517 versions & 1 rubygems

Version Path
playbook_ui-14.11.1.pre.alpha.PLAY17445539 app/pb_kits/playbook/pb_overlay/_overlay.scss
playbook_ui-14.11.1.pre.alpha.PBNTR798datepickerturbo5537 app/pb_kits/playbook/pb_overlay/_overlay.scss
playbook_ui-14.11.1.pre.alpha.pbntr703collapsiblerowsrails5536 app/pb_kits/playbook/pb_overlay/_overlay.scss
playbook_ui-14.11.1.pre.alpha.PLAY1751pbcontenttagpt25529 app/pb_kits/playbook/pb_overlay/_overlay.scss
playbook_ui-14.11.1.pre.alpha.PBNTR7495495 app/pb_kits/playbook/pb_overlay/_overlay.scss
playbook_ui-14.12.0.pre.rc.11 app/pb_kits/playbook/pb_overlay/_overlay.scss
playbook_ui-14.12.0.pre.rc.10 app/pb_kits/playbook/pb_overlay/_overlay.scss
playbook_ui-14.12.0.pre.rc.9 app/pb_kits/playbook/pb_overlay/_overlay.scss
playbook_ui-14.12.0.pre.rc.8 app/pb_kits/playbook/pb_overlay/_overlay.scss
playbook_ui-14.12.0.pre.rc.7 app/pb_kits/playbook/pb_overlay/_overlay.scss
playbook_ui-14.11.1.pre.alpha.play1724darkmodeauditmap5437 app/pb_kits/playbook/pb_overlay/_overlay.scss
playbook_ui-14.11.1.pre.alpha.PBNTR719listdraggablesimple5432 app/pb_kits/playbook/pb_overlay/_overlay.scss
playbook_ui-14.11.1.pre.alpha.PBNTR768stickyrightcolumn5431 app/pb_kits/playbook/pb_overlay/_overlay.scss
playbook_ui-14.12.0.pre.rc.6 app/pb_kits/playbook/pb_overlay/_overlay.scss
playbook_ui-14.11.1.pre.alpha.PBNTR718simiplifieddraggablereact5415 app/pb_kits/playbook/pb_overlay/_overlay.scss
playbook_ui-14.11.1.pre.alpha.play1724darkmodeauditmap5413 app/pb_kits/playbook/pb_overlay/_overlay.scss
playbook_ui-14.12.0.pre.rc.5 app/pb_kits/playbook/pb_overlay/_overlay.scss
playbook_ui-14.11.1.pre.alpha.play1724darkmodeauditmap5409 app/pb_kits/playbook/pb_overlay/_overlay.scss
playbook_ui-14.11.1.pre.alpha.PBNTR718simiplifieddraggablereact5400 app/pb_kits/playbook/pb_overlay/_overlay.scss
playbook_ui-14.11.1.pre.alpha.PBNTR718simiplifieddraggablereact5392 app/pb_kits/playbook/pb_overlay/_overlay.scss