webapp/src/components/Author/Userpic/Userpic.module.scss
2023-11-04 16:37:28 +01:00

123 lines
1.9 KiB
SCSS

.Userpic {
background: #f7f7f7;
border-radius: 100%;
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
position: relative;
img {
height: 100%;
object-fit: cover;
width: 100%;
display: block;
}
.letters {
display: flex;
height: 100%;
width: 100%;
border-radius: 100%;
padding-top: 2px; // line-height hack
justify-content: center;
align-items: center;
color: var(--default-color);
text-transform: uppercase;
background: var(--background-color);
box-shadow: 0 0 0 1px var(--background-color-invert) inset;
}
a:link,
a:visited {
border: none;
display: flex;
height: 100%;
padding: 0 !important;
text-align: center;
width: 100%;
&:hover {
background: none;
color: #000;
}
}
&.XS {
width: 20px;
height: 20px;
min-width: 20px;
overflow: hidden;
.letters {
font-size: 0.8rem;
}
}
&.S {
width: 28px;
height: 28px;
min-width: 28px;
overflow: hidden;
.letters {
font-size: 1rem;
}
}
&.M {
height: 32px;
width: 32px;
min-width: 32px;
.letters {
font-size: 1.2rem;
}
}
&.L {
height: 40px;
width: 40px;
min-width: 40px;
.letters {
font-size: 1.2rem;
}
}
&.XL {
aspect-ratio: 1/1;
margin: 0 auto 1rem;
max-width: 168px;
height: auto;
width: 100%;
@include media-breakpoint-up(md) {
margin: 0;
max-width: 100%;
}
.letters {
align-items: center;
display: flex;
font-size: 2em;
justify-content: center;
line-height: normal;
max-width: 100%;
width: 100%;
}
}
}
.authorsList {
margin-right: 2.4rem;
max-height: 6.8rem;
min-width: 6.8rem;
height: 6.8rem;
width: 6.8rem;
.letters {
line-height: 6.4rem;
}
}