Sha256: d6415d47da511dccff30fe415f36d058a371cb0c2172c5b8ea9b76f7d3c0ee7d

Contents?: true

Size: 1.84 KB

Versions: 340

Compression:

Stored size: 1.84 KB

Contents

@import "../tokens/border_radius";
@import "../tokens/colors";
@import "../tokens/typography";

$avatar-sizes: (
  "xxs":  20px,
  "xs":   28px,
  "sm":   38px,
  "md":   60px,
  "base": 60px,
  "lg":   80px,
  "xl":   100px,
);

[class^=pb_avatar_kit] {
  position: relative;

  @each $name, $size in $avatar-sizes {
    &[class*=_size_#{$name}],
    &[class*=_size_#{$name}_thumb] {
      width: $size;
      height: $size;
      object-fit: cover;
      position: relative;
      flex-shrink: 0;
      flex-grow: 0;
      flex-basis: $size;

      & > [class^=pb_flex_kit] {
        [class^=pb_card_kit].overlay_bottom_center,
        [class^=pb_card_kit].overlay_top_center {
          left: 50%;
          transform: translateX(-50%);
          padding: 2px !important;
        }

        [class^=pb_card_kit].overlay_left_center,
        [class^=pb_card_kit].overlay_right_center {
          top: 50%;
          transform: translateY(-50%);
          padding: 2px !important;
        }
      }

      .avatar_wrapper {
        width: $size;
        height: $size;
        object-fit: cover;
        border-radius: $border-rad-mega;
        background: $slate;
        overflow: hidden;
        position: relative;
        flex-shrink: 0;
        flex-grow: 0;
        flex-basis: $size;

        &::before {
          content: attr(data-initials);
          width: 100%;
          height: 100%;
          display: block;
          color: $white;
          text-align: center;
          font-size: $size * 0.38;
          line-height: $size;
          text-transform: uppercase;
          position: relative;
        }

        img {
          width: 100%;
          height: 100%;
          position: absolute;
          top: 0;
          left: 0;
          border-radius: $border-rad-mega;
          object-fit: cover;
          display: block;
        }
      }
    }
  }
}

Version data entries

340 entries across 340 versions & 1 rubygems

Version Path
playbook_ui-14.0.0.pre.alpha.PLAY15063525 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-14.0.0.pre.alpha.PLAY15063524 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-14.0.0.pre.alpha.PLAY15063523 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-14.0.0.pre.alpha.PLAY15063522 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-14.0.0.pre.alpha.PBNTR416formpillsizes3521 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-14.0.0.pre.alpha.PLAY15063520 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-14.0.0.pre.alpha.PLAY14923518 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-14.0.0.pre.alpha.PLAY15063511 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-14.0.0.pre.alpha.PA1477timestampkit3509 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-14.0.0.pre.alpha.PLAY14733507 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-14.0.0.pre.alpha.PBNTR416formpillsizes3506 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-14.0.0.pre.alpha.PA1477timestampkit3502 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-14.0.0.pre.alpha.PBNTR415starratingform3493 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-14.0.0.pre.alpha.PBNTR415starratingform3492 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-14.0.0.pre.alpha.PLAY1475bumpaxecoredependency3483 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-14.0.0.pre.alpha.PLAY14733479 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-14.0.0.pre.alpha.dependabotnpmandyarnreactjoyride2823478 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-14.0.0.pre.alpha.PLAY14113475 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-14.0.0.pre.alpha.play1447alphatest3462 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-14.1.0 app/pb_kits/playbook/pb_avatar/_avatar.scss