Skip to content

fix(client): zoom cover images instead of stretching #487

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions apps/client/src/components/IdealImage/IdealImage.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { getAtLeastImage } from "../../services/tools";
import { HTMLProps, SpotifyImage } from "../../services/types";
import s from "./index.module.css";

interface IdealImageProps extends HTMLProps<"img"> {
images: SpotifyImage[];
Expand All @@ -13,6 +14,7 @@ export default function IdealImage({
}: IdealImageProps) {
return (
<img
className={s.image}
alt="cover"
src={getAtLeastImage(images, size)}
height={size}
Expand Down
3 changes: 3 additions & 0 deletions apps/client/src/components/IdealImage/index.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.image {
object-fit: cover;
}
1 change: 1 addition & 0 deletions apps/client/src/components/PlayButton/index.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
left: 0px;
height: 48px;
width: 48px;
object-fit: cover;
}

.icon {
Expand Down
5 changes: 5 additions & 0 deletions apps/client/src/scenes/AlbumStats/index.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
width: var(--header-image-size);
border-radius: var(--radius);
margin-right: 16px;
object-fit: cover;
}

.cardimg {
object-fit: cover;
}

.content {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
height: 48px;
width: 48px;
border-radius: 6px;
object-fit: cover;
}

.item {
Expand Down
1 change: 1 addition & 0 deletions apps/client/src/scenes/ArtistStats/index.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
height: 48px;
width: 48px;
border-radius: 6px;
/*object-fit: cover;*/
}

.songslistened {
Expand Down
1 change: 1 addition & 0 deletions apps/client/src/scenes/Tops/Albums/Album/index.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

.cover {
border-radius: var(--radius);
object-fit: cover;
}

.names > :first-child {
Expand Down
1 change: 1 addition & 0 deletions apps/client/src/scenes/TrackStats/index.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
width: var(--header-image-size);
border-radius: var(--radius);
margin-right: 16px;
object-fit: cover;
}

.content {
Expand Down