mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-10 04:30:25 +02:00
fix image column skeleton aspect ratio
This commit is contained in:
@@ -4,6 +4,15 @@
|
|||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.image-container {
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
.compact-image-container .skeleton {
|
.compact-image-container .skeleton {
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
}
|
}
|
||||||
@@ -24,11 +33,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.image-container-with-aspect-ratio {
|
.image-container-with-aspect-ratio {
|
||||||
display: flex;
|
width: auto;
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
aspect-ratio: 1 / 1;
|
||||||
border-radius: var(--theme-radius-md);
|
border-radius: var(--theme-radius-md);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -40,10 +47,10 @@
|
|||||||
object-position: center;
|
object-position: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.image-container {
|
.skeleton-with-aspect-ratio {
|
||||||
position: relative;
|
width: auto;
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
aspect-ratio: 1 / 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.play-button-overlay {
|
.play-button-overlay {
|
||||||
|
|||||||
@@ -125,6 +125,8 @@ export const ImageColumn = (props: ItemTableListInnerColumn) => {
|
|||||||
<div
|
<div
|
||||||
className={clsx(styles.imageContainer, {
|
className={clsx(styles.imageContainer, {
|
||||||
[styles.compactImageContainer]: props.size === 'compact',
|
[styles.compactImageContainer]: props.size === 'compact',
|
||||||
|
[styles.skeletonWithAspectRatio]:
|
||||||
|
props.size === 'default' || props.size === 'large',
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
<Skeleton containerClassName={styles.skeleton} />
|
<Skeleton containerClassName={styles.skeleton} />
|
||||||
|
|||||||
Reference in New Issue
Block a user