mirror of
https://codeberg.org/angestoepselt/homepage.git
synced 2025-05-24 14:46:16 +00:00
Fix gallery preview rendering bug in Chrome
Since 1fr technically resolves to minmax(auto, 1fr), we were getting images that are larger that we expect.
This commit is contained in:
parent
3122f7c5fa
commit
b32c583171
1 changed files with 11 additions and 9 deletions
|
|
@ -146,8 +146,8 @@
|
|||
.gallery-preview {
|
||||
position: relative;
|
||||
display: grid;
|
||||
grid-template-columns: var(--x1, 50%) 1fr;
|
||||
grid-template-rows: var(--y1, 50%) 1fr;
|
||||
grid-template-columns: var(--x1, 50%) minmax(0, 1fr);
|
||||
grid-template-rows: var(--y1, 50%) minmax(0, 1fr);
|
||||
gap: layout.$tiny-gap;
|
||||
padding: layout.$tiny-gap;
|
||||
height: 27rem;
|
||||
|
|
@ -191,8 +191,8 @@
|
|||
}
|
||||
|
||||
&:hover {
|
||||
grid-template-columns: var(--x2, var(--x1, 50%)) 1fr;
|
||||
grid-template-rows: var(--y2, var(--x2, 50%)) 1fr;
|
||||
grid-template-columns: var(--x2, var(--x1, 50%)) minmax(0, 1fr);
|
||||
grid-template-rows: var(--y2, var(--x2, 50%)) minmax(0, 1fr);
|
||||
|
||||
&::after {
|
||||
opacity: 1;
|
||||
|
|
@ -200,24 +200,26 @@
|
|||
}
|
||||
|
||||
&.horizontal {
|
||||
grid-template-columns: var(--a1, 33.3%) var(--b1, 33.3%) 1fr;
|
||||
grid-template-columns: var(--a1, 33.3%) var(--b1, 33.3%) minmax(0, 1fr);
|
||||
grid-template-rows: auto;
|
||||
|
||||
> img:nth-of-type(1),
|
||||
> img:nth-of-type(3) {
|
||||
> div:nth-of-type(1) > img,
|
||||
> img:nth-of-type(3),
|
||||
> div:nth-of-type(3) > img {
|
||||
grid-column: unset;
|
||||
grid-row: unset;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
grid-template-columns: var(--a2, 33.3%) var(--b2, 33.3%) 1fr;
|
||||
grid-template-columns: var(--a2, 33.3%) var(--b2, 33.3%) minmax(0, 1fr);
|
||||
}
|
||||
|
||||
&.two {
|
||||
grid-template-columns: var(--a1, 50%) 1fr;
|
||||
grid-template-columns: var(--a1, 50%) minmax(0, 1fr);
|
||||
|
||||
&:hover {
|
||||
grid-template-columns: var(--a2, 50%) 1fr;
|
||||
grid-template-columns: var(--a2, 50%) minmax(0, 1fr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue