Skip to content

Commit

Permalink
Theme: Adjust card grid image sizes
Browse files Browse the repository at this point in the history
Better match the sizes to the grid breakpoints

See #2679
  • Loading branch information
adamwoodnz committed Sep 3, 2024
1 parent 7e3ae33 commit 819656a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wp-content/themes/pub/wporg-learn-2024/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ function eager_load_first_card_rows_images( $attr, $attachment, $size ) {
*/
function modify_grid_image_sizes( $sizes, $size, $image_src, $image_meta, $attachment_id ) {
if ( is_front_page() || is_archive() || is_search() || is_page( 'my-courses' ) ) {
return '(max-width: 768px) 100vw, (max-width: 1270px) 50vw, 33vw';
return '(max-width: 750px) 100vw, (max-width: 1270px) 50vw, (max-width: 1320px) 33vw, 350px';
}

return $sizes;
Expand Down

0 comments on commit 819656a

Please sign in to comment.