Sha256: d3a3d135f55438e985c776c4fd1946f2707e3fe2d001d30319c5ce5ac948627e

Contents?: true

Size: 1.78 KB

Versions: 51

Compression:

Stored size: 1.78 KB

Contents

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

$avatar-sizes: (
  "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*=_#{$name}],
    &[class*=_#{$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_xs {
          right: -4px;
        }

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

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

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

Version data entries

51 entries across 51 versions & 1 rubygems

Version Path
playbook_ui-10.0.0.pre.alphafonts app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-9.19.0.pre.alpha.pre.fonts2 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-9.19.0 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-9.19.0.pre.alphafonts app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-9.18.0.flow.bin.alpha app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-9.18.0 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-9.17.0 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-9.17.0.pre.decouple.website2 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-9.16.0 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-9.15.0 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-9.15.0.pre.decouple.website1 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-9.14.1.alpha.radio.alignment app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-9.14.1.alpha.highcharts9 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-9.14.1 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-9.13.0 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-9.12.0 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-9.12.0.pre.text.addon app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-9.11.0 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-9.10.0 app/pb_kits/playbook/pb_avatar/_avatar.scss
playbook_ui-9.10.0.pre.date.time.stacked.1 app/pb_kits/playbook/pb_avatar/_avatar.scss