Skip to content

Commit

Permalink
Merge pull request #1225 from vektor-inc/fix/editor/g3-vertical-margin
Browse files Browse the repository at this point in the history
[ G3 ] エディタでブロックの上下につく余分な余白を調整
  • Loading branch information
kurudrive authored Jan 22, 2025
2 parents 7e82308 + 5a48eaf commit 5d80cb7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
8 changes: 6 additions & 2 deletions _g3/assets/_scss/block/_block_editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,16 @@
.editor-styles-wrapper .is-layout-flow > * + *:is([class*="wp-block"],[class*="vk_"]) {
margin-block-start: 0;
}
// コアに :root :where(.editor-styles-wrapper) :where(.is-layout-constrained)>* { margin-block-start: 24px; } つけられるので打ち消し
:root .editor-styles-wrapper :where(.is-layout-constrained)>* {
margin-block-start: 0;
}
/*
theme.json 有効にすると
.editor-styles-wrapper .is-layout-flow > * { margin-block-end:0; }
つけられるので .common に記載と同じ指定で打ち消し
*/
.editor-styles-wrapper .is-layout-flow > *{
.editor-styles-wrapper *{
&:is(
.wp-block-table,
p,
Expand All @@ -85,7 +89,7 @@
dl,
blockquote,
iframe
) {
):not(:last-child){
margin-block-end:var(--vk-margin-element-bottom);
}
&:is( h1,h2,h3,h4,h5,h6 ) {
Expand Down
2 changes: 1 addition & 1 deletion _g3/assets/css/editor.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 @@ -35,6 +35,8 @@ [email protected]

== Changelog ==

[ G3 ][ Bug fix ] Adjusting the unintentional vertical margins between blocks in the editor

v15.29.4
[ G3 ][ Design Bug Fix ] Excluded child elements from expanding to full content width when the parent has the `.is-layout-flex` class by adding a `:not` selector.
[ G3 ][ Bug fix ] Fix block width on editor with narrow screen.
Expand Down

0 comments on commit 5d80cb7

Please sign in to comment.