Skip to content

Commit

Permalink
Fixed gap between the image and shadow on the frontend when a link an…
Browse files Browse the repository at this point in the history
…d "Shadow" style were applied.
  • Loading branch information
mtdkei authored Nov 25, 2024
1 parent b0e2558 commit 13c5b60
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions _g3/assets/_scss/block/_block.scss
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,10 @@ body .wp-block-image figure {
.wp-block-image {
img {
height:auto;
// block にしないと枠線スタイルで画像下部に意図しない余白ができてしまう
display: block;
}
// Addressing the image ratio issue in WordPress 6.3
img:not([style*='object-fit']) {
height: auto !important; // !important to override inline styles.
}
// theme.json 有りの場合
&.aligncenter {
Expand All @@ -88,6 +90,12 @@ body .wp-block-image figure {
margin-left: 0;
margin-bottom: 0.5em;
}
&:not(.is-style-vk-image-shadow) {
img {
// block にしないと枠線スタイルで画像下部に意図しない余白ができてしまう
display: block;
}
}
}

/*-------------------------------------------*/
Expand Down Expand Up @@ -372,16 +380,6 @@ hr.wp-block-separator {
overflow: visible;
}

/*-------------------------------------------*/
/* image Block
/*-------------------------------------------*/
// Addressing the image ratio issue in WordPress 6.3
.wp-block-image {
img:not([style*='object-fit']) {
height: auto !important; // !important to override inline styles.
}
}

/*-------------------------------------------*/
/* Post Date Block
/*-------------------------------------------*/
Expand Down

0 comments on commit 13c5b60

Please sign in to comment.