www-new/components/TeamMemberCard.module.css

178 lines
2.7 KiB
CSS

.card {
display: grid;
grid-template-columns: calc(126rem / 16) auto;
grid-template-areas:
"picture name"
"picture role"
"picture description";
column-gap: calc(32rem / 16);
row-gap: 0;
justify-items: start;
align-items: start;
}
.picture {
grid-area: picture;
justify-self: center;
max-width: calc(126rem / 16);
max-height: calc(126rem / 16);
clip-path: circle();
}
.image {
width: calc(126rem / 16);
height: calc(126rem / 16);
clip-path: circle();
object-fit: cover;
}
.name {
grid-area: name;
margin: 0;
color: var(--primary-accent);
font-size: calc(36rem / 16);
font-weight: 600;
}
.role {
grid-area: role;
margin: 0;
color: var(--primary-heading);
font-size: calc(24rem / 16);
line-height: calc(40 / 24);
font-weight: 600;
}
.description {
grid-area: description;
}
.description > *:first-child {
margin-top: 0;
}
/* Popup */
@keyframes popup {
0% {
transform: scale(0.4) translate(0, -50%);
}
100% {
transform: scale(1) translate(0, -50%);
}
}
@keyframes revealBg {
0% {
opacity: 0;
}
100% {
opacity: 100%;
}
}
.popupBackground {
position: fixed;
width: 100%;
height: 100%;
top: 0;
left: 0;
z-index: 11;
background-color: var(--navbar-page-overlay);
animation: revealBg 0.2s forwards;
}
.popupContainer {
position: fixed;
left: 0;
right: 0;
top: 50%;
z-index: 12;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
box-sizing: border-box;
padding: calc(40rem / 16);
max-height: 75vh;
overflow: auto;
background-color: var(--secondary-background);
animation: popup 0.7s forwards;
}
.closeBtn {
position: absolute;
align-self: flex-end;
cursor: pointer;
display: flex;
justify-content: center;
align-items: center;
/* reset default button styling */
background: none;
border: none;
padding: 0;
}
.popupContent {
display: flex;
flex-direction: column;
align-items: center;
}
.popupContent .name {
margin-top: calc(24rem / 16);
font-size: calc(18rem / 16);
font-weight: 600;
}
.popupContent .role {
margin-bottom: calc(16rem / 16);
font-size: calc(18rem / 16);
font-weight: 600;
}
.popupContent .description {
display: block;
font-size: calc(14rem / 16);
}
.popupContent .description > *:last-child {
margin-bottom: 0;
}
@media only screen and (max-width: calc(768rem / 16)) {
.card {
display: flex;
flex-direction: column;
align-items: center;
max-width: calc(135rem / 16);
margin: 0;
}
.name {
margin-top: calc(24rem / 16);
font-weight: 700;
}
.name,
.role {
text-align: center;
font-size: calc(14rem / 16);
}
.description {
display: none;
}
}