PersonCard refactoring
This commit is contained in:
1 parent
24773f0c65
commit
27bbdad7b1
4 files changed
+113
-122
No files matched your search
@@ -1,95 +0,0 @@
|
||||
.PersonCard {
|
||||
--person-card-width: 30%;
|
||||
--person-card-height: 24em;
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
margin: var(--single-margin) 0;
|
||||
|
||||
width: var(--person-card-width);
|
||||
min-width: 10em;
|
||||
max-width: 30em;
|
||||
|
||||
//border: 1px solid #ccc;
|
||||
//border-radius: 3px;
|
||||
|
||||
& > a {
|
||||
display: block;
|
||||
position: relative;
|
||||
// height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.PersonCard-Picture {
|
||||
border-radius: 3px;
|
||||
|
||||
width: 100%;
|
||||
height: var(--person-card-height);
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: var(--person-card-height);
|
||||
|
||||
object-fit: cover;
|
||||
}
|
||||
}
|
||||
|
||||
.PersonCard-Title, .PersonCard-Body {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
padding: 10px;
|
||||
box-sizing: border-box;
|
||||
color: white;
|
||||
text-align: center;
|
||||
text-shadow: 0 0 3px #000;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.PersonCard-Title {
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.PersonCard-Body {
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
|
||||
//Animation
|
||||
|
||||
.PersonCard-Picture {
|
||||
overflow: hidden;
|
||||
|
||||
img {
|
||||
transition: transform 150ms ease-out;
|
||||
}
|
||||
}
|
||||
|
||||
.PersonCard {
|
||||
&:hover {
|
||||
img {
|
||||
transform: scale(1.05);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Tablet
|
||||
|
||||
@media screen and (min-width: var(--tablet-min-width)) and (max-width: var(--tablet-max-width)) {
|
||||
.PersonCard {
|
||||
--person-card-height: 20em;
|
||||
}
|
||||
|
||||
@media screen and (orientation: portrait) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Mobile
|
||||
|
||||
@media (max-width: var(--mobile-width)) {
|
||||
.PersonCard {
|
||||
--person-card-width: 100%;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user