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