Some fix for iOS

This commit is contained in:
DrMint 2024-02-26 16:33:12 +01:00
parent 133fa015e5
commit 88b9613abf
2 changed files with 33 additions and 8 deletions

View File

@ -287,12 +287,25 @@ const { t, getLocalizedUrl } = await getI18n(Astro.locals.currentLocale);
&#library {
& > .grid {
& > :global(a) {
padding: 10%;
@media (max-width: 40rem) {
padding: 5%;
}
@media (max-width: 22rem) {
padding: 10%;
}
}
@media (max-width: 40rem) {
grid-template-columns: 1fr 1fr;
}
@media (max-width: 25rem) {
@media (max-width: 22rem) {
grid-template-columns: 1fr;
gap: 12px;
}
}
}
@ -300,14 +313,10 @@ const { t, getLocalizedUrl } = await getI18n(Astro.locals.currentLocale);
& > .grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
column-gap: clamp(6px, 2vmin, 16px);
row-gap: clamp(6px + 6px, 2vmin + 6px, 16px);
}
& > .flex {
display: flex;
column-gap: clamp(6px, 2vmin, 16px);
row-gap: clamp(6px + 6px, 2vmin + 6px, 16px);
flex-wrap: wrap;
@media (max-width: 35rem) {
@ -315,6 +324,15 @@ const { t, getLocalizedUrl } = await getI18n(Astro.locals.currentLocale);
grid-template-columns: 1fr;
}
}
& > .grid,
& > .flex {
gap: clamp(6px, 2vmin, 16px);
@media (max-width: 22rem) {
gap: 12px;
}
}
}
}
</style>

View File

@ -16,7 +16,7 @@ const { img, name, href } = Astro.props;
<img src={img.dark} class="when-dark-theme" alt={name} title={name} />
</>
) : (
<p>{name}</p>
<div><p>{name}</p></div>
)
}
</a>
@ -29,16 +29,23 @@ const { img, name, href } = Astro.props;
display: grid;
place-items: center;
padding: 24px;
border-radius: 12px;
user-select: none;
aspect-ratio: 2;
& > img {
object-fit: contain;
height: 100%;
width: 100%;
aspect-ratio: 2;
}
& > div {
aspect-ratio: 2;
width: 100%;
display: grid;
place-content: center;
}
}
</style>