Skip to content
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

[ G2 / G3 ] 画像にリンクを貼ると画像下部に余白ができるのを修正しました #1204

Merged
merged 5 commits into from
Nov 25, 2024
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
24 changes: 10 additions & 14 deletions _g2/assets/_scss/block/_block.scss
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,15 @@ kbd {
body .wp-block-image figure {
margin-bottom:1em;
}
.wp-block-image img {
height:auto;
// block にしないと枠線スタイルで画像下部に意図しない余白ができてしまう
display: block;

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

/*-------------------------------------------*/
Expand Down Expand Up @@ -354,13 +359,4 @@ body .wp-block-image figure {
// WP6.3からwp-block-cover にoverflow: clip; がついて、中に幅広・全幅ブロックを設置しても見切れてしまうようになったため追加
.wp-block-cover:has( .alignwide , .alignfull, [data-align=wide], [data-align=full]){
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.
}
}
}
2 changes: 1 addition & 1 deletion _g2/assets/css/common.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion _g2/assets/css/common_editor.css

Large diffs are not rendered by default.

16 changes: 4 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 Down Expand Up @@ -372,16 +374,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
2 changes: 1 addition & 1 deletion _g3/assets/css/editor.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion _g3/assets/css/style-theme-json.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion _g3/assets/css/style.css

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ https://www.vektor-inc.co.jp/inquiry/

== Changelog ==

[ G3 / G2 ][ Design Bug Fix ] Fixed a gap below the image with a link applied.

v15.28.1
[ G3 / G2 ][ Bug fix ] Since WordPress 6.7.1 started outputting contain-intrinsic-size: 3000px 1500px, add a reset for this in .card.

Expand Down
Loading