Skip to content

Commit

Permalink
Using shorthand styles
Browse files Browse the repository at this point in the history
Ensuring that spacing gap controls are shown by default in the otherwise empty Dimensions panel.
  • Loading branch information
ramonjd committed Oct 19, 2021
1 parent eb3772c commit addede3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 4 additions & 1 deletion packages/block-library/src/navigation/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,10 @@
"rem",
"vh",
"vw"
]
],
"__experimentalDefaultControls": {
"blockGap": true
}
}
},
"viewScript": "file:./view.min.js",
Expand Down
6 changes: 2 additions & 4 deletions packages/block-library/src/navigation/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,7 @@
.wp-block-navigation,
.wp-block-navigation .wp-block-page-list,
.wp-block-navigation__container {
row-gap: calc(var(--wp--style--block-gap, 2em) / 4);
column-gap: var(--wp--style--block-gap, 2em);
gap: calc(var(--wp--style--block-gap, 2em) / 4) var(--wp--style--block-gap, 2em);
}

// Menu items with background.
Expand All @@ -241,8 +240,7 @@
&,
.wp-block-navigation .wp-block-page-list,
.wp-block-navigation__container {
row-gap: calc(var(--wp--style--block-gap, 0) / 4);
column-gap: var(--wp--style--block-gap, 0.5em);
gap: calc(var(--wp--style--block-gap, 0) / 4) var(--wp--style--block-gap, 0.5em);
}
}

Expand Down

0 comments on commit addede3

Please sign in to comment.