Skip to content

Commit

Permalink
Fix the padding, and resort the menu
Browse files Browse the repository at this point in the history
The padding was actually 11px, now that's compensated for.

Also sort the Edit as HTML button at the end of the first list. See #7433
  • Loading branch information
Joen Asmussen committed Aug 9, 2018
1 parent a8c4a21 commit e028724
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
4 changes: 2 additions & 2 deletions packages/components/src/menu-group/style.scss
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.components-menu-group {
width: 100%;
padding: 10px;
padding: $item-spacing - $border-width;
}

.components-menu-group__label {
margin-bottom: 10px;
margin-bottom: $item-spacing;
color: $dark-gray-300;
}
15 changes: 7 additions & 8 deletions packages/editor/src/components/block-settings-menu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,6 @@ export class BlockSettingsMenu extends Component {
// Should this just use a DropdownMenu instead of a DropDown ?
<NavigableMenu className="editor-block-settings-menu__content">
<_BlockSettingsMenuFirstItem.Slot fillProps={ { onClose } } />
{ count === 1 && (
<BlockModeToggle
clientId={ firstBlockClientId }
onToggle={ onClose }
role="menuitem"
/>
) }
{ count === 1 && (
<BlockUnknownConvertButton
clientId={ firstBlockClientId }
Expand All @@ -126,7 +119,13 @@ export class BlockSettingsMenu extends Component {
/>
) }
<_BlockSettingsMenuPluginsExtension.Slot fillProps={ { clientIds, onClose } } />
<div className="editor-block-settings-menu__separator" />
{ count === 1 && (
<BlockModeToggle
clientId={ firstBlockClientId }
onToggle={ onClose }
role="menuitem"
/>
) } <div className="editor-block-settings-menu__separator" />
{ count === 1 && (
<ReusableBlockDeleteButton
clientId={ firstBlockClientId }
Expand Down
6 changes: 3 additions & 3 deletions packages/editor/src/components/block-settings-menu/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@

.editor-block-settings-menu__content {
width: 100%;
padding: $item-spacing;
padding: $item-spacing - $border-width;
}

.editor-block-settings-menu__separator {
margin-top: $item-spacing;
margin-bottom: $item-spacing;
margin-left: -$item-spacing;
margin-right: -$item-spacing;
margin-left: -$item-spacing + $border-width;
margin-right: -$item-spacing + $border-width;
border-top: $border-width solid $light-gray-500;

// Check if the separator is the last child in the node and if so, hide itself
Expand Down

0 comments on commit e028724

Please sign in to comment.