mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-14 20:40:17 -05:00
Merge pull request #21379 from overleaf/jel-gallery-images-hover
[web] Clickable gallery images hover effect GitOrigin-RevId: dfd992d970f9b0a2171bf598c27d474a06a5be74
This commit is contained in:
parent
94d14e3900
commit
a3ce640c7e
2 changed files with 72 additions and 5 deletions
|
@ -48,12 +48,35 @@
|
|||
width: 100%;
|
||||
|
||||
img {
|
||||
@include shadow-md;
|
||||
|
||||
width: 185px;
|
||||
box-shadow: 0 2px 4px 0 rgba(30 37 48 / 16%);
|
||||
border-radius: var(--border-radius-base);
|
||||
position: relative;
|
||||
|
||||
@include media-breakpoint-down(sm) {
|
||||
width: 35vw;
|
||||
}
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
background: var(--neutral-90);
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: var(--border-radius-base);
|
||||
transition: opacity 0.15s ease-in-out;
|
||||
}
|
||||
}
|
||||
|
||||
&:hover {
|
||||
&::before {
|
||||
opacity: 0.08;
|
||||
transition: opacity 0.15s ease-in-out;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -144,20 +144,64 @@
|
|||
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
|
||||
.thumbnail,
|
||||
.thumbnail-tag {
|
||||
position: relative;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
background: var(--neutral-90);
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
transition: opacity 0.15s ease-in-out;
|
||||
}
|
||||
}
|
||||
|
||||
.thumbnail-tag {
|
||||
&::before {
|
||||
border-radius: var(--border-radius-medium);
|
||||
}
|
||||
}
|
||||
|
||||
.thumbnail {
|
||||
&::before {
|
||||
border-radius: var(--border-radius-base);
|
||||
}
|
||||
}
|
||||
|
||||
&:hover {
|
||||
.thumbnail,
|
||||
.thumbnail-tag {
|
||||
&::before {
|
||||
transition: opacity 0.15s ease-in-out;
|
||||
opacity: 0.08;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.thumbnail,
|
||||
.thumbnail-tag {
|
||||
width: 100%;
|
||||
margin: 0 0 var(--spacing-08) 0;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
.thumbnail {
|
||||
img {
|
||||
@include shadow-lg;
|
||||
|
||||
border-radius: var(--border-radius-base);
|
||||
}
|
||||
}
|
||||
|
||||
.caption {
|
||||
// Override Server Pro template styles
|
||||
|
|
Loading…
Reference in a new issue