Sha256: 12eb653258722b1bc08be574c9079eff9890f2439baaa7f204a3c136ff7240b6

Contents?: true

Size: 1.77 KB

Versions: 113

Compression:

Stored size: 1.77 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%);
        }

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

      .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

113 entries across 113 versions & 1 rubygems

Version Path
playbook_ui-14.10.0.pre.alpha.play1662cssbargraph5201 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-14.11.0.pre.rc.9 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-14.10.0.pre.alpha.play1662cssbargraph5200 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-14.11.0.pre.rc.8 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-14.11.0.pre.rc.7 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-14.11.0.pre.rc.6 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-14.11.0.pre.rc.5 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-14.10.0.pre.alpha.play1662cssbargraph5193 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-14.11.0.pre.rc.4 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-14.11.0.pre.rc.3 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-14.10.0.pre.alpha.PBNTR662stickyrightcolumnreact5160 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-14.11.0.pre.rc.2 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-14.11.0.pre.rc.1 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-14.10.0.pre.alpha.PBNTR775formmatingmaskdefaultvalue5137 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-14.11.0.pre.rc.0 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-14.9.0.pre.alpha.PBNTR767advancedtablemultiheadercolumns5136 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-14.9.0.pre.alpha.PBNTR775formmatingmaskdefaultvalue5121 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-14.9.0.pre.alpha.PBNTR775formmatingmaskdefaultvalue5120 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-14.10.0 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-14.10.0.pre.rc.24 app/pb_kits/playbook/pb_avatar/_avatar.scss