mirror of
https://github.com/Sped0n/bridget.git
synced 2026-04-14 10:09:31 -07:00
optimize coding style of image.scss
This commit is contained in:
@@ -3,40 +3,26 @@
|
||||
position: absolute;
|
||||
width: auto;
|
||||
max-width: 100vw;
|
||||
transform: translate(-50%, -50%);
|
||||
transform: translate(-50%, -50%, 0);
|
||||
opacity: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
// prevent webkit from partly repainting the frame
|
||||
box-shadow: 0 0 2px rgba(0, 0, 0, 0.05);
|
||||
will-change: transform;
|
||||
|
||||
img {
|
||||
max-height: 55vmin;
|
||||
max-width: 100vw;
|
||||
object-fit: contain;
|
||||
width: auto;
|
||||
// prevent webkit from partly repainting the frame
|
||||
box-shadow: 0 0 2px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
&[data-status='t0'] {
|
||||
transition: all 0.5s ease-in-out 1.5s;
|
||||
max-height: calc(100vh - var(--footer-height));
|
||||
width: auto;
|
||||
max-width: 100vw;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
// prevent webkit from partly repainting the frame
|
||||
box-shadow: 0 0 2px rgba(0, 0, 0, 0.05);
|
||||
|
||||
img {
|
||||
transition: all 0.5s ease-in-out 2s;
|
||||
max-height: calc(100vh - var(--footer-height));
|
||||
width: auto;
|
||||
max-width: 100vw;
|
||||
object-fit: contain;
|
||||
// prevent webkit from partly repainting the frame
|
||||
box-shadow: 0 0 2px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,26 +47,12 @@
|
||||
}
|
||||
|
||||
&[data-status='r0'] {
|
||||
transition: all 0.5s ease-in-out 1s;
|
||||
max-height: 55vmin;
|
||||
position: absolute;
|
||||
transform: translate(-50%, -50%);
|
||||
opacity: 1;
|
||||
width: auto;
|
||||
max-width: 100vw;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
// prevent webkit from partly repainting the frame
|
||||
box-shadow: 0 0 2px rgba(0, 0, 0, 0.05);
|
||||
transition: all 0.5s ease-in-out 1s;
|
||||
|
||||
img {
|
||||
transition: all 1s ease-in-out 0s;
|
||||
max-height: 55vmin;
|
||||
max-width: 100vw;
|
||||
object-fit: contain;
|
||||
width: auto;
|
||||
// prevent webkit from partly repainting the frame
|
||||
box-shadow: 0 0 2px rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user