Sha256: 75596160b46a3e6e3cc6068e01e90a34400e94b14f0e9a9930c6599a48dcc9b7

Contents?: true

Size: 1.86 KB

Versions: 530

Compression:

Stored size: 1.86 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;

      .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;
        }
      }
      [class^=pb_online_status] {
        position: absolute;
        right: 0;
        top: 0;
        bottom: auto;
        left: auto;

        &.size_xxs {
          right: -5px;
        }

        &.size_xs {
          right: -4px;
        }

        &.size_md {
          top: auto;
          bottom: 6px;
        }

        &.size_lg {
          top: auto;
          bottom: 14px;
        }

        &.size_xl {
          top: auto;
          bottom: 22px;
        }
      }
    }
  }
}

Version data entries

530 entries across 530 versions & 1 rubygems

Version Path
playbook_ui-13.27.0 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-13.26.0.pre.alpha.PBNTR291Dropdownrailsv22840 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-13.26.0.pre.alpha.jasoncypretpatch12820 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-13.26.0.pre.alpha.jasoncypretpatch12816 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-13.25.0.pre.alpha.PBNTR291Dropdownrailsv22812 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-13.26.0 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-13.25.0.pre.alpha.PLAY1249fixTooltipswrappingformelementscausingmisalignment2785 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-13.25.0.pre.alpha.PLAY1249fixTooltipswrappingformelementscausingmisalignment2783 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-13.25.0.pre.alpha.PBNTR272Dropdownkitv42769 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-13.25.0.pre.alpha.barchartfix2766 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-13.25.0.pre.alpha.PLAY761globalpaddingpropsbuttons2713 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-13.25.0 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-13.24.0.pre.alpha.play1305drycontenttag2689 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-13.24.0.pre.alpha.PBNTR261NewKitDropdown2681 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-13.24.0.pre.alpha.PLAY1181circleiconkitfixsizingerrorglobalspacingprops2675 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-13.24.0.pre.alpha.PLAY998backgroundkitremoveemptyinlinline2666 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-13.23.0.pre.alpha.PLAY1284investigation2657 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-13.24.0 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-13.22.0.pre.alpha.pbntr254barchartnegativenumber2640 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-13.22.0.pre.alpha.PLAY1297updatetextstyles2636 app/pb_kits/playbook/pb_avatar/_avatar.scss