diff --git a/assets/css/ie-editor.css b/assets/css/ie-editor.css index df8795887..b4b235c95 100644 --- a/assets/css/ie-editor.css +++ b/assets/css/ie-editor.css @@ -556,6 +556,12 @@ a:hover { clear: both; } +[data-align=full] .wp-block-cover, +[data-align=full] .wp-block-cover-image { + margin-top: 0; + margin-bottom: 0; +} + .wp-block-cover .wp-block-cover__inner-container, .wp-block-cover .wp-block-cover-image-text, .wp-block-cover .wp-block-cover-text, @@ -913,6 +919,11 @@ a:hover { padding: 30px; } +[data-align=full] .wp-block-group.has-background { + margin-top: 0; + margin-bottom: 0; +} + .wp-block-group.is-style-twentytwentyone-border { border: 3px solid #28303d; padding: 30px; @@ -1663,6 +1674,11 @@ dt { font-weight: bold; } +[data-align=full] .wp-block-media-text { + margin-top: 0; + margin-bottom: 0; +} + .wp-block-media-text .wp-block-media-text__content { padding: 25px; } @@ -3112,12 +3128,6 @@ pre.wp-block-verse { max-width: none; } -.block-editor-block-list__layout:not(.edit-site-block-editor__block-list) .wp-block[data-align=full] > [data-block], -.block-editor-block-list__layout:not(.edit-site-block-editor__block-list) .wp-block.alignfull > [data-block] { - margin-top: 0; - margin-bottom: 0; -} - .alignleft { margin: 0; margin-right: 25px; diff --git a/assets/css/ie.css b/assets/css/ie.css index 38b728ebd..908cfd976 100644 --- a/assets/css/ie.css +++ b/assets/css/ie.css @@ -2781,6 +2781,12 @@ input[type=reset]:hover { clear: both; } +.wp-block-cover.alignfull, +.wp-block-cover-image.alignfull { + margin-top: 0; + margin-bottom: 0; +} + .wp-block-cover .wp-block-cover__inner-container { color: currentColor; margin-top: 30px; @@ -3879,6 +3885,11 @@ dd { */ } +.wp-block-media-text.alignfull { + margin-top: 0; + margin-bottom: 0; +} + .wp-block-media-text a:focus img { outline-offset: -1px; } diff --git a/assets/css/style-editor.css b/assets/css/style-editor.css index c3e89e72f..cabe6cb45 100644 --- a/assets/css/style-editor.css +++ b/assets/css/style-editor.css @@ -660,6 +660,12 @@ a:hover { clear: both; } +[data-align=full] .wp-block-cover, +[data-align=full] .wp-block-cover-image { + margin-top: 0; + margin-bottom: 0; +} + .wp-block-cover .wp-block-cover__inner-container, .wp-block-cover .wp-block-cover-image-text, .wp-block-cover .wp-block-cover-text, @@ -877,6 +883,11 @@ a:hover { padding: var(--global--spacing-vertical); } +[data-align=full] .wp-block-group.has-background { + margin-top: 0; + margin-bottom: 0; +} + .wp-block-group.is-style-twentytwentyone-border { border: calc(3 * var(--separator--height)) solid var(--global--color-border); padding: var(--global--spacing-vertical); @@ -1264,6 +1275,11 @@ dt { font-weight: bold; } +[data-align=full] .wp-block-media-text { + margin-top: 0; + margin-bottom: 0; +} + .wp-block-media-text .wp-block-media-text__content { padding: var(--global--spacing-horizontal); } @@ -2200,12 +2216,6 @@ pre.wp-block-verse { max-width: none; } -.block-editor-block-list__layout:not(.edit-site-block-editor__block-list) .wp-block[data-align=full] > [data-block], -.block-editor-block-list__layout:not(.edit-site-block-editor__block-list) .wp-block.alignfull > [data-block] { - margin-top: 0; - margin-bottom: 0; -} - .alignleft { margin: 0; margin-right: var(--global--spacing-horizontal); diff --git a/assets/sass/05-blocks/cover/_editor.scss b/assets/sass/05-blocks/cover/_editor.scss index 2b59387bd..f7d1b1aa7 100644 --- a/assets/sass/05-blocks/cover/_editor.scss +++ b/assets/sass/05-blocks/cover/_editor.scss @@ -10,6 +10,11 @@ margin-top: inherit; margin-bottom: inherit; + [data-align="full"] & { + margin-top: 0; + margin-bottom: 0; + } + .wp-block-cover__inner-container, .wp-block-cover-image-text, .wp-block-cover-text, diff --git a/assets/sass/05-blocks/cover/_style.scss b/assets/sass/05-blocks/cover/_style.scss index e7e157b0b..489186460 100644 --- a/assets/sass/05-blocks/cover/_style.scss +++ b/assets/sass/05-blocks/cover/_style.scss @@ -5,6 +5,11 @@ clear: both; } + &.alignfull { + margin-top: 0; + margin-bottom: 0; + } + background-color: var(--cover--color-background); min-height: var(--cover--height); margin-top: inherit; diff --git a/assets/sass/05-blocks/group/_editor.scss b/assets/sass/05-blocks/group/_editor.scss index 3de7d54ac..159c57a8c 100644 --- a/assets/sass/05-blocks/group/_editor.scss +++ b/assets/sass/05-blocks/group/_editor.scss @@ -17,6 +17,11 @@ &.has-background { padding: var(--global--spacing-vertical); + + [data-align="full"] & { + margin-top: 0; + margin-bottom: 0; + } } // Block Styles diff --git a/assets/sass/05-blocks/media-text/_editor.scss b/assets/sass/05-blocks/media-text/_editor.scss index ed7889c0d..3f3a5fcf5 100644 --- a/assets/sass/05-blocks/media-text/_editor.scss +++ b/assets/sass/05-blocks/media-text/_editor.scss @@ -1,5 +1,10 @@ .wp-block-media-text { + [data-align="full"] & { + margin-top: 0; + margin-bottom: 0; + } + .wp-block-media-text__content { padding: var(--global--spacing-horizontal); diff --git a/assets/sass/05-blocks/media-text/_style.scss b/assets/sass/05-blocks/media-text/_style.scss index 1d2eaa897..7879886f3 100644 --- a/assets/sass/05-blocks/media-text/_style.scss +++ b/assets/sass/05-blocks/media-text/_style.scss @@ -1,5 +1,10 @@ .wp-block-media-text { + &.alignfull { + margin-top: 0; + margin-bottom: 0; + } + a:focus img { outline-offset: -1px; } diff --git a/assets/sass/05-blocks/utilities/_editor.scss b/assets/sass/05-blocks/utilities/_editor.scss index 35ca9363f..3d963ca19 100644 --- a/assets/sass/05-blocks/utilities/_editor.scss +++ b/assets/sass/05-blocks/utilities/_editor.scss @@ -107,22 +107,6 @@ } } -// Selects the post editor and not the site editor -.block-editor-block-list__layout:not(.edit-site-block-editor__block-list) { - - .wp-block { - - &[data-align="full"], - &.alignfull { - - >[data-block] { - margin-top: 0; - margin-bottom: 0; - } - } - } -} - .alignleft { margin: 0; margin-right: var(--global--spacing-horizontal); diff --git a/style-rtl.css b/style-rtl.css index a75080e29..9bacca061 100644 --- a/style-rtl.css +++ b/style-rtl.css @@ -1969,6 +1969,12 @@ input[type=reset]:hover, clear: both; } +.wp-block-cover.alignfull, +.wp-block-cover-image.alignfull { + margin-top: 0; + margin-bottom: 0; +} + .wp-block-cover .wp-block-cover__inner-container, .wp-block-cover .wp-block-cover-image-text, .wp-block-cover .wp-block-cover-text, @@ -2703,6 +2709,11 @@ dd { */ } +.wp-block-media-text.alignfull { + margin-top: 0; + margin-bottom: 0; +} + .wp-block-media-text a:focus img { outline-offset: -1px; } diff --git a/style.css b/style.css index a7565422f..60c243941 100644 --- a/style.css +++ b/style.css @@ -1979,6 +1979,12 @@ input[type=reset]:hover, clear: both; } +.wp-block-cover.alignfull, +.wp-block-cover-image.alignfull { + margin-top: 0; + margin-bottom: 0; +} + .wp-block-cover .wp-block-cover__inner-container, .wp-block-cover .wp-block-cover-image-text, .wp-block-cover .wp-block-cover-text, @@ -2713,6 +2719,11 @@ dd { */ } +.wp-block-media-text.alignfull { + margin-top: 0; + margin-bottom: 0; +} + .wp-block-media-text a:focus img { outline-offset: -1px; }