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 6, 2021
1 parent 8655546 commit 477069f
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 @@ -98,7 +98,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 @@ -230,8 +230,7 @@
// Menu items with no background.
.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:where(.has-background) {
.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 477069f

Please sign in to comment.