initiatived21/d21

View on GitHub
client/app/assets/stylesheets/aleut/components/_components.avatar.scss

Summary

Maintainability
Test Coverage
/*------------------------------------*\
    #AVATAR
\*------------------------------------*/

/**
 * Avatar component, can be an image or an SVG, need to be styled differently
 */

/**
 *  1. Set border-radius only for img avatars, svg has its own border.
 *
 */

img.c-avatar {
  border-radius: 62px;  /* [1] */
}

.c-avatar--large {
  width: 123px;
  height: 123px;
}

.c-avatar--comment {
  width: $comment-avatar-size;
  height: $comment-avatar-size;

  &.c-avatar--large {
    width: $avatar-size;
    height: $avatar-size;
  }
}