@freshworks/crayons
Version:
Crayons Web Components library
113 lines (111 loc) • 2.04 kB
CSS
/* Need to check with designer */
/* Need to check with designer */
:host {
font-family: var(--fw-font-family, -apple-system, blinkmacsystemfont, "Segoe UI", roboto, oxygen, ubuntu, cantarell, "Open Sans", "Helvetica Neue", sans-serif);
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
box-sizing: border-box;
}
:host {
display: inline-block;
--size: 3rem;
}
.avatar {
display: inline-flex;
align-items: center;
justify-content: center;
position: relative;
box-sizing: border-box;
font-size: calc(var(--size) * 0.5);
font-weight: 400;
overflow: hidden;
user-select: none;
vertical-align: middle;
}
.avatar__initials {
line-height: 1;
font-weight: 600;
font-size: 32px;
text-align: center;
text-transform: uppercase;
}
.avatar__image {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover;
}
.avatar--dark {
background-color: #527fa5;
color: #fff;
}
.avatar--dark--initials {
border: 2px solid rgba(18, 52, 77, 0.16);
}
.avatar--light {
background-color: #dff0ff;
color: #12344d;
}
.avatar--light--initials {
border: 2px solid #bedbf5;
}
.avatar--circle {
border-radius: 50%;
}
.avatar--rounded {
border-radius: 4px;
}
.avatar--square {
border-radius: 0;
}
.avatar--xxlarge {
width: 96px;
height: 96px;
}
.avatar--xxlarge .avatar__initials {
font-size: 32px;
}
.avatar--xlarge {
width: 72px;
height: 72px;
}
.avatar--xlarge .avatar__initials {
font-size: 24px;
}
.avatar--large {
width: 56px;
height: 56px;
}
.avatar--large .avatar__initials {
font-size: 20px;
}
.avatar--medium {
width: 40px;
height: 40px;
}
.avatar--medium .avatar__initials {
font-size: 16px;
}
.avatar--small {
width: 32px;
height: 32px;
}
.avatar--small .avatar__initials {
font-size: 14px;
}
.avatar--xsmall {
width: 24px;
height: 24px;
}
.avatar--xsmall .avatar__initials {
font-size: 12px;
}
.avatar--xxsmall {
width: 20px;
height: 20px;
}
.avatar--xxsmall .avatar__initials {
font-size: 10px;
}