Skip to content

Commit 0522eae

Browse files
committed
reflect gutter options in editor
1 parent 646ac65 commit 0522eae

4 files changed

Lines changed: 15 additions & 3 deletions

File tree

readme.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,12 @@ Please create a new GitHub issue and let us know: [https://github.com/liip/boots
143143

144144
== Changelog ==
145145

146+
= 4.2.0 =
147+
148+
* [FEATURE] Reflect noGutters and horizontalGutters options visually in editor (WordPress >= 5.4).
149+
* [FIX] Add missing "Medium" size to vertical gutter options.
150+
* [FIX] Fix label of default css grid gutter option ("Medium" instead of "None").
151+
146152
= 4.1.0 =
147153

148154
* [COMPATIBILITY] Tested up to WordPress 6.0.

src/row/block.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ registerBlockType( 'wp-bootstrap-blocks/row', {
4040
'data-alignment': attributes.alignment,
4141
'data-vertical-alignment': attributes.verticalAlignment,
4242
'data-editor-stack-columns': attributes.editorStackColumns,
43+
'data-no-gutters': attributes.noGutters,
44+
'data-horizontal-gutters': attributes.horizontalGutters,
4345
};
4446
},
4547

src/row/edit.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ horizontalGuttersOptions = applyFilters(
218218

219219
horizontalGuttersOptions = [
220220
{
221-
label: __( 'Bootstrap Default', 'wp-bootstrap-blocks' ),
221+
label: __( 'Bootstrap Default (Medium)', 'wp-bootstrap-blocks' ),
222222
value: '',
223223
},
224224
...horizontalGuttersOptions,
@@ -229,6 +229,10 @@ let verticalGuttersOptions = [
229229
label: __( 'Small', 'wp-bootstrap-blocks' ),
230230
value: 'gy-3',
231231
},
232+
{
233+
label: __( 'Medium', 'wp-bootstrap-blocks' ),
234+
value: 'gy-4',
235+
},
232236
{
233237
label: __( 'Large', 'wp-bootstrap-blocks' ),
234238
value: 'gy-5',
@@ -264,7 +268,7 @@ cssGridGuttersOptions = applyFilters(
264268

265269
cssGridGuttersOptions = [
266270
{
267-
label: __( 'Bootstrap Default (None)', 'wp-bootstrap-blocks' ),
271+
label: __( 'Bootstrap Default (Medium)', 'wp-bootstrap-blocks' ),
268272
value: '',
269273
},
270274
...cssGridGuttersOptions,

src/row/editor.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
}
107107

108108
// Fix column padding in WordPress >= 5.4 (block-editor-xy classes only exist in WordPress >= 5.2)
109-
body:not(.branch-5-2):not(.branch-5-3) [data-type="wp-bootstrap-blocks/row"]:not([data-editor-stack-columns="true"]) .wp-block-wp-bootstrap-blocks-row {
109+
body:not(.branch-5-2):not(.branch-5-3) [data-type="wp-bootstrap-blocks/row"]:not([data-editor-stack-columns="true"]):not([data-no-gutters="true"]):not([data-horizontal-gutters="gx-0"]) .wp-block-wp-bootstrap-blocks-row {
110110
@include break-small() {
111111
> .block-editor-inner-blocks > .block-editor-block-list__layout {
112112
> [data-type="wp-bootstrap-blocks/column"] {

0 commit comments

Comments
 (0)